private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(this); } //Setting Ground box playerSize = GetComponent <BoxCollider2D>().size; boxSize = new Vector2(playerSize.x - 0.03f, groundedSkin); rb = GetComponent <Rigidbody2D>(); }
// Start is called before the first frame update void Start() { anim = GetComponentInChildren <Animator>(); pMoveScript = GetComponentInChildren <PlayerMovementV2>(); pJumpScript = GetComponentInChildren <PlayerJumpV2>(); }