Ejemplo n.º 1
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.JUMPING;
        //anim = controller.anima;
        FastFall = false;
        controller.FitAnima.Play("JumpF");


        if (controller.BfAction == BufferedAction.SHIELD)
        {
            controller.velocity.y = 16;
            controller.BfAction   = BufferedAction.SHIELD;
        }
        else
        {
            if (controller.Inputter.jumpButtonHeld == true || controller.Inputter.TapjumpButtonHeld == true)
            {
                controller.velocity.y = controller.jump.jumpVelocity;
            }
            else
            {
                controller.velocity.y = controller.jump.hopVelocity;
            }
        }

        controller.C_Drag = controller.jump.AirDrag;
        if (Mathf.Abs(controller.velocity.x) >= controller.jump.jumpMaxHVelocity)
        {
            JuDccel = true;
        }
        InitVel = controller.velocity.x;
    }
Ejemplo n.º 2
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.DASH_START;
        //anim = controller.anima;
        controller.FitAnima.Play("Dash");
        DeAccel = false;
        if (controller.previousState == CharacterState.PIVOT)
        {
            Init_direction = controller.x_facing;
        }
        else
        {
            Init_direction = controller.Inputter.Init_Xdirection;
        }
        controller.x_direction = Init_direction;
        controller.x_facing    = Init_direction;
        controller.Animator.CorrectColliders();
        controller.ClearBuffer();
        controller.ApplyFriction = false;
        if (PrevVelocity > 0)
        {
            controller.velocity.x = (PrevVelocity * 0.5f) * Init_direction;
        }
    }
Ejemplo n.º 3
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller        = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state  = CharacterState.FALLING;
        controller.C_Drag = controller.jump.AirDrag;
        if (controller.previousState != CharacterState.JUMPING && controller.previousState != CharacterState.AIRJUMP)
        {
            controller.velocity.x = controller.velocity.x * 0.6f;
        }

        //anim = controller.anima;
        if (!controller.Animator.fading)
        {
            controller.FitAnima.Play("Fall");
        }
        else
        {
            controller.Animator.fading = false;
        }
        controller.ClearBuffer();

        if (controller.Inputter.y <= -0.75f)
        {
            FastFall = true;
        }
    }
Ejemplo n.º 4
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.AIRJUMP;
        //anim = controller.anima;
        FastFall  = false;
        HopWindow = false;
        HopDccel  = false;
        controller.FitAnima.Play("JumpF", 0, 0f);
        HopTimer = 2;
        controller.velocity.x = 0;
        if (controller.Inputter.x > 0.7f)
        {
            controller.x_direction = 1;
            controller.velocity.x  = controller.jump.jumpHorizontalVelocity;
        }
        else if (controller.Inputter.x < -0.7f)
        {
            controller.x_direction = -1;
            controller.velocity.x  = controller.jump.jumpHorizontalVelocity * -1;
        }

        AxisVel = 0;
        controller.velocity.y = controller.jump.doubleJumpVelocity;
        controller.ClearBuffer();
        controller.C_Drag = controller.jump.AirDrag;
    }
Ejemplo n.º 5
0
 void OnDestroy()
 {
     // stop the state machine to ensure all the Exit() gets called
     if (m_PlayerSM != null)
     {
         m_PlayerSM.StopSM();
         m_PlayerSM = null;
     }
 }
Ejemplo n.º 6
0
		void OnDestroy()
		{
				// stop the state machine to ensure all the Exit() gets called
				if (m_PlayerSM != null)
				{
						m_PlayerSM.StopSM();
						m_PlayerSM = null;
				}
		}
Ejemplo n.º 7
0
    //public Animation anim;

    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.ATTACK;
        //anim = controller.anima;
        CheckAerialSpecial();
        SeedUp();
    }
Ejemplo n.º 8
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.UKEMI;
        //anim = controller.anima;
        DecideTech(TechDirection);
        controller.velocity.x    = 0;
        controller.ApplyFriction = false;
    }
Ejemplo n.º 9
0
    //public Animation anim;

    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.SHIELDING;
        //anim = controller.anima;
        controller.FitAnima.Play("Shielding");
        controller.ApplyFriction = true;
        controller.C_Drag        = controller.movement.Drag;
    }
Ejemplo n.º 10
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.PRE_JUMP;
        //anim = controller.anima;
        controller.FitAnima.Play("JumpSq");
        controller.ClearBuffer();
        controller.ApplyFriction = false;
    }
Ejemplo n.º 11
0
    public override void Enter()
    {
        //Check Amount of Knockback
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        MyHitboxData     = controller.Strike.CurrentDmg;
        controller.state = CharacterState.SHIELDSTOP;
        controller.FitAnima.Play("Shielding");
        HitStopTimer = MyHitboxData.Hitlag;
        ApplyShield();
    }
    //public Animation anim;

    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.HITSTOP;
        //anim = controller.anima;
        controller.FitAnima.Play("GDamage1");
        controller.ApplyFriction = true;
        controller.C_Drag        = controller.movement.friction;
        controller.FitAnima.Update(0);
    }
Ejemplo n.º 13
0
    public override void Enter()
    {
        //Check Amount of Knockback
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller               = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state         = CharacterState.STUNNED;
        controller.ApplyFriction = false;
        HitStunTimer             = (SentKnockback.Hitstun - 2);
        DICalc();
        KnockbackCalc();
    }
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.RUNBRAKE;
        //anim = controller.anima;
        controller.FitAnima.Play("Brake");
        controller.ClearBuffer();
        BrakeTimer        = 2;
        controller.C_Drag = controller.movement.friction;
    }
Ejemplo n.º 15
0
    //public Animation anim;

    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.ATTACK;
        //anim = controller.anima;
        controller.EndAnim = false;
        controller.ClearBuffer();
        controller.ApplyFriction = true;
        controller.FitAnima.Play("Holding");
    }
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.WAVEDASHLAND;
        //anim = controller.anima;
        controller.FitAnima.Play("WaveDashL");
        controller.ClearBuffer();
        controller.ApplyFriction = true;
        controller.C_Drag        = controller.battle.WavedashFriction;
    }
    public override void Enter()
    {
        //Check Amount of Knockback
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller               = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state         = CharacterState.SHIELDSTUN;
        controller.ApplyFriction = true;
        BlockStunTimer           = (SentKnockback.Blockstun - 2);
        controller.FitAnima.Play("Shielding");
        controller.C_Drag = 1.2f;
        KnockbackCalc();
    }
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.WALKING;
        //anim = controller.anima;
        controller.FitAnima.Play("Walk");
        Init_direction      = controller.Inputter.Init_Xdirection;
        controller.x_facing = Init_direction;
        controller.Animator.CorrectColliders();
        controller.ClearBuffer();
        controller.ApplyFriction = false;
    }
Ejemplo n.º 19
0
    //public Animation anim;

    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.LANDING;
        //anim = controller.anima;
        controller.FitAnima.Play("Land");
        controller.velocity.y   = 0;
        controller.kbvelocity.y = 0;
        controller.ClearBuffer();
        controller.ApplyFriction = true;
        controller.C_Drag        = controller.movement.friction;
    }
Ejemplo n.º 20
0
    public override void Enter()
    {
        //Check Amount of Knockback
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        MyHitboxData     = controller.Strike.CurrentDmg;
        controller.state = CharacterState.HITSTOP;
        HitStopTimer     = MyHitboxData.Hitlag;
        CheckKnockback();
        if (MyHitboxData.effect != null)
        {
            EffectSpawn();
        }
    }
Ejemplo n.º 21
0
    public override void Enter()
    {
        //Check Amount of Knockback
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.TUMBLE;
        controller.ClearBuffer();
        controller.EndAnim               = false;
        controller.IASA                  = true;
        controller.ApplyFriction         = false;
        controller.Animator.AnimateSpine = true;
        controller.FitAnima.Play("Tumble");
        AnimRot = 0;
    }
Ejemplo n.º 22
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.RUNTURN;
        //anim = controller.anima;
        controller.FitAnima.Play("Turn");
        controller.NoFall        = true;
        controller.BfAction      = BufferedAction.PIVOT;
        Init_direction           = controller.Inputter.Init_Xdirection;
        controller.ApplyFriction = false;
        BrakeTimer        = 2;
        controller.C_Drag = controller.movement.friction;
    }
Ejemplo n.º 23
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.CAUGHT;
        //anim = controller.anima;
        controller.EndAnim = false;
        controller.ClearBuffer();
        controller.ApplyFriction = false;
        controller.velocity      = Vector3.zero;
        controller.kbvelocity    = Vector3.zero;
        controller.x_facing      = OppFacing * -1;
        controller.Animator.CorrectColliders();
        controller.FitAnima.Play("Caught");
        TrueOffset = new Vector3(controller.GrabbedOffset.x * controller.x_facing, controller.GrabbedOffset.y, controller.GrabbedOffset.z);
    }
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.WAVEDASH;
        //anim = controller.anima;
        controller.ApplyFriction = true;
        controller.IASA          = false;
        controller.C_Drag        = controller.battle.WavedashFriction;
        controller.velocity.x    = controller.jump.WavedashVelocity * controller.Inputter.buffer_x;
        if (controller.velocity.y > 0)
        {
            controller.velocity.y *= 0.08f;
        }
        IASA_Timer = 10;
    }
    //public Animation anim;

    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.ATTACK;
        //anim = controller.anima;
        controller.EndAnim = false;
        controller.ClearBuffer();
        controller.ApplyFriction = false;
        controller.velocity      = Vector3.zero;
        controller.kbvelocity    = Vector3.zero;
        controller.x_facing      = (int)Mathf.Sign(controller.LedgeGrabbed.localRotation.z);
        controller.Animator.CorrectColliders();
        controller.FitAnima.Play("LedgeCatch");
        LedgeAnchor = new Vector3(controller.LedgeOffset.x * controller.x_facing, controller.LedgeOffset.y);
        controller.transform.position = controller.LedgeGrabbed.position + LedgeAnchor;
    }
Ejemplo n.º 26
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.PIVOT;
        //anim = controller.anima;
        controller.FitAnima.Play("Idle");
        controller.BfAction = BufferedAction.PIVOT;
        Init_direction      = controller.Inputter.Init_Xdirection;
        controller.x_facing = Init_direction;
        controller.Animator.CorrectColliders();
        TurnVel = Mathf.Abs(controller.velocity.x);
        controller.velocity.x    = 0;
        controller.ApplyFriction = true;
        controller.C_Drag        = controller.movement.friction;
        PivotTimer = 0;
    }
Ejemplo n.º 27
0
    public override void Enter()
    {
        //Check Amount of Knockback
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        MyHitboxData     = controller.Strike.CurrentDmg;
        controller.state = CharacterState.THROWN;
        HitStopTimer     = MyHitboxData.Hitlag;
        CheckKnockback();
        if (MyHitboxData.effect != null)
        {
            EffectSpawn();
        }
        controller.GrabOpponent.GrabOpponent = null;
        controller.GrabOpponent       = null;
        controller.transform.position = new Vector3(controller.transform.position.x, controller.transform.position.y, 0);
    }
Ejemplo n.º 28
0
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller        = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state  = CharacterState.FALLING;
        controller.C_Drag = controller.jump.AirDrag;
        if (controller.previousState != CharacterState.JUMPING && controller.previousState != CharacterState.AIRJUMP)
        {
            controller.velocity.x = controller.velocity.x * 0.6f;
        }
        controller.Animator.PassThroughTimer = 10;
        controller.IsPassing = true;
        //anim = controller.anima;
        controller.Animator.AnimateSpine = true;
        controller.FitAnima.Play("Passing");

        controller.Inputter.FramesYNeutral = 6;
    }
Ejemplo n.º 29
0
    //public Animation anim;

    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.ATTACK;
        //anim = controller.anima;
        controller.EndAnim = false;
        controller.ClearBuffer();
        controller.ApplyFriction = true;
        controller.FitAnima.Play("Grab");
        controller.FitAnima.Update(0);
        if (controller.previousState == CharacterState.WAVEDASHLAND)
        {
            controller.C_Drag = controller.battle.WavedashFriction;
        }
        else
        {
            controller.C_Drag = controller.movement.friction;
        }
        SeedUp();
    }
    //public Animation anim;

    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.SHIELDENTER;
        //anim = controller.anima;
        controller.FitAnima.Play("ShieldEnter");
        controller.ApplyFriction = true;
        controller.NoFall        = true;
        controller.C_Drag        = controller.movement.Drag;
        controller.velocity.x   *= 0.55f;
        AnimTimer = 0;
        if (controller.Inputter.y <= -0.60f && controller.Inputter.y >= -0.85f)
        {
            HoldDown = true;
        }
        else
        {
            HoldDown = false;
        }
    }
    public override void Enter()
    {
        FitAnimatorStateMachine SM = (FitAnimatorStateMachine)GetStateMachine();

        controller       = SM.m_GameObject.GetComponent <RayCastColliders>();
        controller.state = CharacterState.ATTACK;
        //anim = controller.anima;
        DtiltRef = 41;
        FtiltRef = 42;
        JabRef   = 43;
        CheckGroundAttack();
        controller.ClearBuffer();
        controller.ApplyFriction = true;
        if (controller.previousState == CharacterState.WAVEDASHLAND)
        {
            controller.C_Drag = controller.battle.WavedashFriction;
        }
        else
        {
            controller.C_Drag = controller.movement.friction;
        }
        SeedUp();
    }
Ejemplo n.º 32
0
		void Start ()
		{
				// create the state machine and start it
				m_PlayerSM = new FitAnimatorStateMachine(this.gameObject);
				m_PlayerSM.StartSM();
		}