Пример #1
0
    // Use this for initialization
    void Start()
    {
        oxygen  = max0xygen;
        lives   = maxLives;
        display = GetComponent <PlayerHeartDisplay>();
        display.OnChangeHeart(maxLives, lives);
        display.OnChangeOxygen((int)oxygen);
        oxygenCounter = liveLossTime;

        invisibilityCounter = 0;
        flashCounter        = flashLength;

        audioSource = GetComponent <AudioSource>();
        controller  = GetComponent <PlayerController>();
    }
Пример #2
0
    private void Awake()
    {
        // Gets inventory manager component
        _inventoryManager = GetComponent <InventoryManager>();

        // Gets player heart display component
        _playerHeartDisplay = GetComponent <PlayerHeartDisplay>();

        // Gets animation manager
        _animationManager = GetComponent <Animation>();

        // Gets the position of the beginning of the game
        _lastCheckpointPosition = transform.position;
        _source = GetComponent <AudioSource>();
    }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     display = GetComponent <PlayerHeartDisplay>();
 }