示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        //punchScript = GetComponent<PunchScript>();
        if (this.gameObject.tag == "Player")
        {
            thisPunchScript  = GetComponent <PunchScriptTutorial>();
            otherPunchScript = GameObject.FindGameObjectWithTag("Enemy").GetComponent <PunchScriptTutorial>();
        }
        else if (this.gameObject.tag == "Enemy")
        {
            thisPunchScript  = GetComponent <PunchScriptTutorial>();
            otherPunchScript = GameObject.FindGameObjectWithTag("Player").GetComponent <PunchScriptTutorial>();
        }

        currentHp = maxHp;

        currentStamina = maxStamina;

        currentStun = 0;
    }
示例#2
0
 private void Start()
 {
     animator    = transform.GetComponentInChildren <Animator>();
     punchScript = GetComponent <PunchScriptTutorial>();
 }
示例#3
0
 // Start is called before the first frame update
 void Start()
 {
     punchScript = GetComponent <PunchScriptTutorial>();
 }