Esempio n. 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);
    }
Esempio n. 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);
    }
Esempio n. 3
0
 public override void Enter(HeroMover hero)
 {
     Start(hero);
     kabezuriCoroutine = hero.SpawnKabezuris(hero.Parameters.MoveInAirParams);
     hero.StartCoroutine(kabezuriCoroutine);
 }