private void Awake() { m_Rigidbody2D = GetComponent <Rigidbody2D>(); if (onLandEvent == null) { onLandEvent = new UnityEvent(); } if (onCrouchEvent == null) { onCrouchEvent = new boolEvent(); } }
void Start() { healthAmount = 1; m_vitesse = 3f; forceDeSaut = 10f; myRB = this.GetComponent <Rigidbody2D>(); crouchColliderDisabler = this.GetComponent <BoxCollider2D>(); myTrans = this.transform; groundCheck = GameObject.Find(this.name + "/GroundCheck").transform; if (onLandEvent == null) { onLandEvent = new UnityEvent(); } if (onCrouchEvent == null) { onCrouchEvent = new boolEvent(); } }