#pragma warning restore 0169

        protected override void OnUpdate()
        {
            PlayerSystem.Sync();
            ZakoSystem.Sync();
            var             spawner = ECSBulletManager.GetBulletSpawnDataQueue();
            BulletSpawnData data;

            while (spawner.TryDequeue(out data))
            {
                if (data.type_ == 0)
                {
                    ECSBulletManager.spawnBullet(PostUpdateCommands,
                                                 Time.GetCurrent(),
                                                 ref data.position_,
                                                 ref data.velocity_);
                }
                else
                {
                    ECSBulletManager.spawnEnemyBullet(PostUpdateCommands,
                                                      Time.GetCurrent(),
                                                      ref data.position_,
                                                      ref data.velocity_);
                }
            }
        }
Exemple #2
0
#pragma warning restore 0169

        protected override void OnUpdate()
        {
            PlayerSystem.Sync();
            var            spawner = ECSSightManager.GetSightSpawnDataQueue();
            SightSpawnData data;

            while (spawner.TryDequeue(out data))
            {
                ECSSightManager.spawn(PostUpdateCommands,
                                      Time.GetCurrent(),
                                      ref data);
            }
        }