// Start is called before the first frame update void Start() { myControllerInputs = this.gameObject.GetComponent <controllerInputs>(); myAnimator = this.gameObject.GetComponent <Animator>(); effectAnimator = this.transform.GetChild(1).GetComponent <Animator>(); myAudioManager = this.gameObject.GetComponent <AudioManager>(); myAttackSystem = this.gameObject.GetComponent <attackSystem>(); }
// Start is called before the first frame update void Start() { if (this.tag == "1") { mySystem = gameStart.player1Object.GetComponent <attackSystem>(); Debug.Log(mySystem.tag); } else if (this.tag == "2") { mySystem = gameStart.player2Object.GetComponent <attackSystem>(); Debug.Log(mySystem.tag); } }
// Use this for initialization void Start() { float a = transform.lossyScale.x; guaiwalk = GetComponent <CharacterController> (); anim = GetComponent <Animator> (); t = GameObject.FindWithTag("Player"); playerAnim = t.GetComponent <Animator> (); playerAttack = t.GetComponent <attackSystem> (); anim.SetBool("death", false); anim.SetBool("idle", true); anim.SetInteger("attack", -1); attackDistance += a * 1.5f - 1.5f; attackPoint *= a; hp *= a; }
// Start is called before the first frame update void Awake() { otherPlayer = this.gameObject.tag == "1" ? 2 : 1; parentObject = this.transform.GetComponentInParent <attackSystem>(); }