void Awake() { Me = this; currState = State.idle; isWallJumpLocked = false; hasJustJumped = false; isBike = false; movingDir = Alias.STILL; //by default PC looks right (dir == 1) facingDir = Alias.RIGHT; wallJumpVector = new Vector2(wallJumpImpulse * Mathf.Cos(wallJumpAngle * Mathf.Deg2Rad), wallJumpImpulse * Mathf.Sin(wallJumpAngle * Mathf.Deg2Rad)); jumpDir = Alias.STILL; shieldColl = GameObject.Find("ShieldCollider").GetComponent <EdgeCollider2D>(); shieldSprite = GameObject.Find("ShieldCollider").GetComponent <SpriteRenderer>(); uniHealth = gameObject.GetComponent <UnibikeHealthManager>(); }
private void Awake() { me = this; currentUnibikeHp = maxUnibikeHitPoints; }