internal static void Execute(Command com)
        {
            AgentController cont = AgentController.InstanceManagers [com.ControllerID];

            cont.Execute(com);


            DefaultMessageRaiser.Execute(com);
        }
Beispiel #2
0
        internal static void Execute(Command com)
        {
            if (!GameStarted)
            {
                Debug.LogError("BOOM");
                return;
            }
            AgentController cont = AgentController.InstanceManagers [com.ControllerID];

            cont.Execute(com);


            DefaultMessageRaiser.Execute(com);
        }
Beispiel #3
0
        public static void Simulate()
        {
            ForeSight--;
            Frame frame = Frames[LockstepManager.FrameCount];

            if (frame.Commands != null)
            {
                for (i = 0; i < frame.Commands.Count; i++)
                {
                    Command         com        = frame.Commands[i];
                    AgentController controller = AgentController.InstanceManagers[com.ControllerID];
                    controller.Execute(com);
                }
            }
        }
Beispiel #4
0
        public static void Simulate()
        {
            if (FreeSimulate)
            {
                return;
            }
            TweakFramerate();
            ForeSight--;
            Frame frame = frames [LockstepManager.InfluenceFrameCount];

            if (frame.Commands.IsNotNull())
            {
                for (int i = 0; i < frame.Commands.Count; i++)
                {
                    Command com = frame.Commands [i];
                    switch (com.LeInput)
                    {
                    case InputCode.Meta:
                        MetaActionCode actionCode = (MetaActionCode)com.Target;
                        int            id         = com.Count;
                        switch (actionCode)
                        {
                        case MetaActionCode.NewPlayer:
                            AgentController controller = new AgentController();
                            if (id == ClientManager.ID)
                            {
                                PlayerManager.AddController(controller);
                            }
                            TeamManager.JoinTeam(controller);

                            break;
                        }
                        break;

                    default:
                        AgentController cont = AgentController.InstanceManagers [com.ControllerID];
                        cont.Execute(com);
                        break;
                    }
                }
            }
            if (LockstepManager.InfluenceFrameCount == EndFrame)
            {
                FreeSimulate = true;
            }
        }
Beispiel #5
0
        internal static void Execute(Command com)
        {
            if (!GameStarted)
            {
                Debug.LogError("BOOM");
                return;
            }
            if (com.ControllerID != byte.MaxValue)
            {
                AgentController cont = AgentController.InstanceManagers [com.ControllerID];
                cont.Execute(com);
            }
            else
            {
                BehaviourHelperManager.Execute(com);
            }

            DefaultMessageRaiser.Execute(com);
        }