Exemplo n.º 1
0
    void Start()
    {
        LevelData = new Level1Data();
        //Books = new GameObject[BookSpawnPoints.Length];
        //Enemies = new GameObject[EnemySpawnPoints.Length];
        SpawnBooks();
        StartCoroutine(SpawnEnemies());

        GameObject player = PlayerManager.instance.GetPlayer();

        PlayerScript = player.GetComponent <PlayerRanged>();
        RangedCombatController combatController = player.GetComponent <RangedCombatController>();

        combatController.OnRangedAttackCast += DecrementBooks;
        combatController.OnRangedAttackCast += UpdateHudBooks;

        UpdateHud();
        Phase1 = true;
    }
Exemplo n.º 2
0
 void Start()
 {
     Cam = Camera.main;
     locomotionController = GetComponent <LocomotionController>();
     combatController     = GetComponent <RangedCombatController>();
 }