Пример #1
0
    public override void Enter(HeroMover hero)
    {
        hero.velocity.Y = force == -1 ? hero.Parameters.JumpForce : force;

        Start(hero);

        if (isFromGround)
        {
            hero.ObjsHolderForStates.JumpEffectPool.ActivateOne(hero.WantsToGoRight ? "r" : "l");
        }
        else
        {
            hero.ObjsHolderForStates.JumpEffectInAirPool.ActivateOne(hero.WantsToGoRight ? "r" : "l");
        }
        kabezuriCoroutine = hero.SpawnKabezuris(hero.Parameters.MoveInAirParams);
        hero.StartCoroutine(kabezuriCoroutine);

        hero.Jumped(isFromGround, isKick: false);
    }
Пример #2
0
    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);
    }
Пример #3
0
 public override void Resume(HeroMover hero)
 {
     Init(hero);
     hero.StartCoroutine(tsuchihokotiCoroutine);
 }
Пример #4
0
 public override void Enter(HeroMover hero)
 {
     Init(hero);
     tsuchihokotiCoroutine = Tsuchihokori(hero.ObjsHolderForStates.TsuchihokoriPool, hero.Parameters, hero);
     hero.StartCoroutine(tsuchihokotiCoroutine);
 }
Пример #5
0
 public override void Resume(HeroMover hero)
 {
     hero.SetAnimManually(right ? "jumpfr" : "jumpfl");
     hero.StartCoroutine(kabezuriCoroutine);
 }
Пример #6
0
 public override void Resume(HeroMover hero)
 {
     Start(hero);
     hero.StartCoroutine(kabezuriCoroutine);
 }
Пример #7
0
 public override void Enter(HeroMover hero)
 {
     Start(hero);
     kabezuriCoroutine = hero.SpawnKabezuris(hero.Parameters.MoveInAirParams);
     hero.StartCoroutine(kabezuriCoroutine);
 }