コード例 #1
0
 // Update is called once per frame
 void Update()
 {
     if (!dead && KeepTheBroom.instance.KTB_State != KeepTheBroom.KTB_States.BEFORE_GAME)
     {
         //WallJumpedUpdate();
         KnockBackedUpdate();
         CalculVelocity();
         Jump();
         //ResetWallStickTime();
         AirJumpCountReset();
         PassingtroughPlatform();
         FlipDirection();
         OnAttackInput();
         SetAnimation();
         Vector3 newPosition = collid.transform.position;
         newPosition.y = spineTransform.position.y - 2.2f;
         //newPosition.x = spineTransform.position.x;
         collid.transform.position = newPosition;
         collid.size = new Vector2(collid.size.x, topHeadTransform.position.y - Mathf.Min(RfootTransform.position.y, LfootTransform.position.y));
         collisions.CheckCollisions();
     }
 }