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);
            }
        }
示例#2
0
 public override void TryPerform(PRActions activity)
 {
     switch (activity)
     {
     case PRActions.PLAYER_HIT_GROUND:
         stateMachine.ChangeState(player.run);
         break;
     }
 }
示例#3
0
 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;
            }
        }
示例#5
0
 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;
     //}
 }
示例#6
0
        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;
            }
        }
示例#7
0
        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;
            }
        }
示例#8
0
        //public CommandBehaviourBuilder WithActor(IActor actor)
        //{
        //    command.SetActor(actor);
        //    return this;
        //}

        public CommandBehaviourBuilder WithAction(PRActions action)
        {
            command.SetAction(action);
            return(this);
        }
示例#9
0
        //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);
 }
示例#11
0
 public void TryPerform(PRActions activity)
 {
     CurrentState.TryPerform(activity);
 }
示例#12
0
 public virtual void TryPerform(PRActions activity)
 {
 }
示例#13
0
 public override void TryPerform(PRActions activity)
 {
     throw new NotImplementedException();
 }
示例#14
0
 public void TryPerform(PRActions acitivty)
 {
     _stateMachine.TryPerform(acitivty);
 }
示例#15
0
 public void TryPerform(PRActions action)
 {
     throw new NotImplementedException();
 }
示例#16
0
 public virtual void TryPerform(PRActions activity)
 {
     throw new NotImplementedException();
 }