protected override eStateTrans UpdateAction(Entity entity, ref IState <Entity> nextState) { //Damage判定 if (CollitionCheck(entity)) { nextState = new DeathState_Com("Bom", gameDevice); return(eStateTrans.ToNext); } nextState = this; return(eStateTrans.ToThis); }
protected override eStateTrans UpdateAction(Entity entity, ref IState <Entity> nextState) { if (jumpComp.GetIsLand()) { UpdateComponent moveComp = new C_MoveWithBoarAI(Parameter.PlayerLimitSpeed); entity.RemoveComponent(jumpComp); entity.RegisterComponent(moveComp); nextState = new MoveState_Com_Boar(gameDevice); return(eStateTrans.ToNext); } if (deadCheck.IsDead()) { entity.RemoveComponent(jumpComp); nextState = new DeathState_Com("Bom", gameDevice); return(eStateTrans.ToNext); } nextState = this; return(eStateTrans.ToThis); }
protected override eStateTrans UpdateAction(Entity entity, ref IState <Entity> nextState) { if (state.IsLand) { float nowSpeed = jumpComp.speed; entity.RemoveComponent(jumpComp); nextState = new MoveState_Com_Player(gameDevice, nowSpeed); return(eStateTrans.ToNext); } //Damage判定 if (CollitionCheck(entity)) { entity.RemoveComponent(jumpComp); collider.DeActive(); nextState = new DeathState_Com("Bom", gameDevice); return(eStateTrans.ToNext); } nextState = this; return(eStateTrans.ToThis); }