Exemplo n.º 1
0
 public static void spawn(EntityCommandBuffer command_buffer,
                          float current_time,
                          ref SparkSpawnData data)
 {
     if (data.type_ == 0)
     {
         spawnSpark(command_buffer, current_time, ref data.position_);
     }
     else
     {
         spawnEnemySpark(command_buffer, current_time, ref data.position_);
     }
 }
Exemplo n.º 2
0
        protected override void OnUpdate()
        {
            var time = Time.GetCurrent();

            for (var i = 0; i < group_.random_list_.Length; ++i)
            {
                var random = group_.random_list_[i];
                var pos    = random.onCube(10f);
                var dat0   = new SparkSpawnData {
                    position_ = pos,
                    type_     = 0,
                };
                ECSSparkManager.spawn(PostUpdateCommands,
                                      time,
                                      ref dat0);
                group_.random_list_[i] = random;
            }
        }