Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        player       = FindObjectOfType <Player>();
        playerEnergy = FindObjectOfType <PlayerEnergyLvl>();
        playerHealth = FindObjectOfType <PlayerHealth>();

        playerData = player.data;
    }
Exemplo n.º 2
0
    private void Awake()
    {
        playerEnergy = FindObjectOfType <PlayerEnergyLvl>();
        playerData   = FindObjectOfType <Player>().data;
        playerENnemy = FindObjectOfType <PlayerEnemyInteraction>();

        enemy       = GetComponent <Enemy>().data;
        enemyPlayer = GetComponent <EnemyPlayerInteraction>();
        if (GameObject.Find("Enemies"))
        {
            gameEnd = GameObject.Find("Enemies").GetComponent <GameEnd>();
        }
    }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     playerEnergy  = GetComponent <PlayerEnergyLvl>();
     specialAttack = GetComponentInChildren <PlayerSpecialAttack>();
 }