void SetDir(Dir dir, HeroMover hero) { if (dir == _dir) { return; } _dir = dir; switch (dir) { case Dir.FR: hero.SetAnimManually("jumpfr"); break; case Dir.FL: hero.SetAnimManually("jumpfl"); break; case Dir.UR: hero.SetAnimManually("jumpur"); break; case Dir.UL: hero.SetAnimManually("jumpul"); break; } }
public override void Enter(HeroMover hero) { HeroVelocity firstSpeed = hero.Parameters.KickParams.KickForce.ToHeroVel(); if (!right) { firstSpeed.X *= -1; } hero.velocity = firstSpeed; hero.CanMove = false; hero.SetAnimManually(right ? "jumpfr" : "jumpfl"); if (hero.KeyDirection == 0) { hero.ForceChangeWantsToGoRight(right); //しっくりこない } hero.SoundGroup.Play("Jump"); hero.ObjsHolderForStates.JumpEffectPool.ActivateOne(right ? "kr" : "kl"); kabezuriCoroutine = hero.SpawnKabezuris(hero.Parameters.MoveInAirParamsAfterKick); hero.StartCoroutine(kabezuriCoroutine); hero.Jumped(isFromGround: false, isKick: true); }
public override void Resume(HeroMover hero) { hero.SetAnimManually(right ? "jumpfr" : "jumpfl"); hero.StartCoroutine(kabezuriCoroutine); }