public void CollectedPowerUp(PowerUpEffectBase powerUpEffect, int index) { List <int> affectedSubScenes = powerUpEffect.GetAffectedSubScenes(index); foreach (int i in affectedSubScenes) { if (i > 2 || i < 0) { throw new Exception("Not a valid subscene!"); } PRActions action = TypeToAction(powerUpEffect.Effect); //todo fix //ICommand command = CommandFactory // .CreateCommandBehaviour() // .WithAction(action) // .Build(); //Request request = Request // .CreateRequest() // .WithReceiver(GameManager.GetInstance().GetReceiver(ReceiverId.Scenes, i)) // .WithCommand(command) // .Build(); //GameManager.GetInstance().SendMessage("AddRequest", request); } }
public override void TryPerform(PRActions activity) { switch (activity) { case PRActions.PLAYER_HIT_GROUND: stateMachine.ChangeState(player.run); break; } }
public override void TryPerform(PRActions activity) { //switch(activity) //{ // case SystemAIActivity.: // stateMachine.ChangeState(AI.charge); // break; // case PlayerActivity.Leaping: // stateMachine.ChangeState(AI.descend); // break; //} }
public override void TryPerform(PRActions activity) { switch (activity) { case PRActions.PLAYER_HIT_GROUND: stateMachine.ChangeState(player.run); break; case PRActions.TOUCH_SWIPE_DOWN: case PRActions.MOUSE_RIGHT_BUTTON: stateMachine.ChangeState(player.powerDescend); break; } }
public override void TryPerform(PRActions activity) { //switch(activity) //{ // case PRActions.TOUCH_SWIPE_UP: // case PRActions.MOUSE_LEFT_BUTTON: // player.PlayerExitSlide(); // stateMachine.ChangeState(player.jump); // break; // case PRActions.PLAYER_SLIDE_OVER: // player.PlayerExitSlide(); // stateMachine.ChangeState(player.run); // break; //} }
public override void TryPerform(PRActions activity) { switch (activity) { case PRActions.TOUCH_SWIPE_UP: case PRActions.MOUSE_LEFT_BUTTON: stateMachine.ChangeState(player.ultraJump); break; case PRActions.TOUCH_SWIPE_DOWN: case PRActions.MOUSE_RIGHT_BUTTON: stateMachine.ChangeState(player.powerDescend); break; case PRActions.PLAYER_REACH_MAX_ALT: stateMachine.ChangeState(player.descend); break; } }
public override void TryPerform(PRActions activity) { switch (activity) { case PRActions.TOUCH_SWIPE_UP: case PRActions.MOUSE_LEFT_BUTTON: stateMachine.ChangeState(player.jump); break; case PRActions.TOUCH_SWIPE_DOWN: case PRActions.MOUSE_RIGHT_BUTTON: stateMachine.ChangeState(player.slide); break; case PRActions.PLAYER_LEAPING: stateMachine.ChangeState(player.descend); break; } }
//public CommandBehaviourBuilder WithActor(IActor actor) //{ // command.SetActor(actor); // return this; //} public CommandBehaviourBuilder WithAction(PRActions action) { command.SetAction(action); return(this); }
//public void SetActor(IActor actor) //{ // this.actor = actor; //} public void SetAction(PRActions action) { this.action = action; }
public override void TryPerform(PRActions activity) { base.TryPerform(activity); }
public void TryPerform(PRActions activity) { CurrentState.TryPerform(activity); }
public virtual void TryPerform(PRActions activity) { }
public override void TryPerform(PRActions activity) { throw new NotImplementedException(); }
public void TryPerform(PRActions acitivty) { _stateMachine.TryPerform(acitivty); }
public void TryPerform(PRActions action) { throw new NotImplementedException(); }
public virtual void TryPerform(PRActions activity) { throw new NotImplementedException(); }