// 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; }
private void Start() { animator = transform.GetComponentInChildren <Animator>(); punchScript = GetComponent <PunchScriptTutorial>(); }
// Start is called before the first frame update void Start() { punchScript = GetComponent <PunchScriptTutorial>(); }