예제 #1
0
    private void Awake()
    {
        OnUpdateHealth += OnUpdateHealthBar;

        foreach (World world in World.All)
        {
            PlayerFollowerSystem playerFollowerSystem = world.GetExistingSystem <PlayerFollowerSystem>();
            if (playerFollowerSystem != null)
            {
                this.playerFollowerSystem = playerFollowerSystem;
            }

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

            PowerupSlotClientSystem powerupSlotClientSystem = world.GetExistingSystem <PowerupSlotClientSystem>();
            if (powerupSlotClientSystem != null)
            {
                this.powerupSlotClientSystem = powerupSlotClientSystem;
            }
        }
    }
예제 #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;
            }
        }
    }