// Use this for initialization
    void Start()
    {
        // Assign player manager script
        player = GetComponent <PlayerManager>();

        // Assign delay health script
        health = GetComponent <LinearDelayHealth.DelayHealth>();
    }
示例#2
0
    public LinearDelayHealth.DelayHealth health;     // LinearHealthBar.Health because I use namespace in the linear health bar script
    #endregion
    #region Start
    private void Start()
    {
        //Reference to the character health script component attached to our player
        health = GetComponent <LinearDelayHealth.DelayHealth>();

        #region Check if we have Key
        //if we have a save key called SpawnPoint
        //then our checkpoint is equal to the game object that is named in out save file or the float x,y,z
        //our transform.position is equal to that of the checkpoint or to the float x,y,z
        #endregion
    }