예제 #1
0
    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;
        }
    }
예제 #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)
 {
     hero.SetAnimManually(right ? "jumpfr" : "jumpfl");
     hero.StartCoroutine(kabezuriCoroutine);
 }