コード例 #1
0
    private void Awake()
    {
        foreach (var world in World.All)
        {
            var placementUpdateSystem = world.GetExistingSystem <PlacementUpdateSystem>();
            if (placementUpdateSystem != null)
            {
                this.placementUpdateSystem = placementUpdateSystem;
                this.placementUpdateSystem.OnUpdatePlacement += OnUpdatePlacement;
            }

            var playerFinishedClientSystem = world.GetExistingSystem <PlayerFinishedClientSystem>();
            if (playerFinishedClientSystem != null)
            {
                playerFinishedClientSystem.OnPlayerFinished += OnPlayerFinished;
            }
        }
    }
コード例 #2
0
    private void Awake()
    {
        foreach (World world in World.All)
        {
            PowerupSlotClientSystem powerupSlotClientSystem = world.GetExistingSystem <PowerupSlotClientSystem>();
            if (powerupSlotClientSystem != null)
            {
                this.powerupSlotClientSystem = powerupSlotClientSystem;
            }

            MissileTargetClientSystem missileTargetClientSystem = world.GetExistingSystem <MissileTargetClientSystem>();
            if (missileTargetClientSystem != null)
            {
                this.missileTargetClientSystem = missileTargetClientSystem;
            }

            PlacementUpdateSystem placementUpdateSystem = world.GetExistingSystem <PlacementUpdateSystem>();
            if (placementUpdateSystem != null)
            {
                placementUpdateSystem.OnUpdatePlacement += OnUpdatePlacement;
            }
        }
    }