public override void Enter(HeroMover hero) { Start_(hero); HeroVelocity vel = hero.Parameters.BendParams.BendBackForce.ToHeroVel(); if (!hero.WantsToGoRight) { vel.X *= -1; } hero.velocity = vel; }
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); }