// Use this for initialization void Start() { blockCharge = MaxBlockingCharge; m_knockBack = GetComponent <KnockBackValues>(); tempFlapCD = FlapCD; rig2D = GetComponent <Rigidbody2D>(); anim = GetComponentInChildren <Animator>(); jmpForce = JumpForce; GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); foreach (GameObject pl in players) { if (pl.transform != this.transform) { enemy = pl.transform; } } }
// Use this for initialization void Start() { Debug.Log(PlayerNumber); blockCharge = MaxBlockingCharge; m_knockBack = GetComponent <KnockBackValues>(); rig2D = GetComponent <Rigidbody2D>(); m_OriginalGravity = rig2D.gravityScale; anim = GetComponentInChildren <Animator>(); jmpForce = JumpForce; GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); foreach (GameObject pl in players) { if (pl.transform != this.transform) { enemy = pl.transform; } } }