private void Start() { movement = GetComponent <PlayerMovement>(); player = ReInput.players.GetPlayer((int)playerNumber - 1); grabCog = GetComponent <GrabCog>(); playerNumberText.text = "P " + (int)playerNumber; }
public void IgnorePlayers(GrabCog thrower) { if (thrower.gameObject.layer == LayerMask.NameToLayer("Team1")) { gameObject.layer = LayerMask.NameToLayer("Ball1"); } else if (thrower.gameObject.layer == LayerMask.NameToLayer("Team2")) { gameObject.layer = LayerMask.NameToLayer("Ball2"); } }