private void Awake()
 {
     if (_playerController == null)
     {
         _playerController = FindObjectOfType <AO_PlayerController>();
     }
 }
示例#2
0
 private void Start()
 {
     _playerController = FindObjectOfType <AO_PlayerController>();
     if (_playerController == null)
     {
         Debug.LogError("COULDNT FIND THE PLAYER CONTROLLER");
     }
 }
    private void Awake()
    {
        _type             = GetComponent <AO_CharacterHumanController>().CharacterType;
        _playerController = FindObjectOfType <AO_PlayerController>();

        if (Txt)
        {
            Txt = FindObjectOfType <UnityEngine.UI.Text>();
        }
    }
示例#4
0
    public virtual void TriggerDeath()
    {
        Die();

        AO_PlayerController p = GameObject.FindWithTag("Player").GetComponent <AO_PlayerController>();

        //Add this character to dead list
        //If important also check off the important character list.


        if (selectedInfectable != null)
        {
            p.ChangeCharacter(selectedInfectable.transform);
        }
    }