コード例 #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
ファイル: Player.cs プロジェクト: VictorKern/Poolpy
    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>();
 }