rrbox / ecs-swift

Entity Component System for swift
MIT License
3 stars 0 forks source link

World のライフサイクル #11

Open rrbox opened 1 year ago

rrbox commented 1 year ago

World は update の中でどの処理をどのような順番で実行するべきなのかを考えます 現在実装されている処理は以下の通りです

rrbox commented 1 year ago

Commands を実行することで生成される Event を分離する

以下のプロトコルを作成し、更新処理で生成された event と commands 処理で生成された event とで区別します。

protocol CommandsEventProtocol {

}

この event 専用の queue を作成し、以下の順番で実行されるようにします

  1. update
  2. event queue (通常) 配信
  3. commands 実行
  4. commands event queue 配信