Exemple #1
0
        public void AgentCreateTest()
        {
            var ac = new AgentController();
            var r  = ac.Create() as ViewResult;

            Assert.IsNotNull(r);
        }
        protected override void OnGameStart()
        {
            AgentController ac = AgentController.Create();

            PlayerManager.AddController(ac);

            for (int i = 0; i < _spawnAmount; i++)
            {
                spawnedAgents.Add(ac.CreateAgent(_spawnCode, Vector2d.zero));
            }
        }
Exemple #3
0
    void Start()
    {
        LockstepManager.Initialize();
        AgentController controller = AgentController.Create();

        for (int i = 0; i < 256; i++)
        {
            controller.CreateAgent(AgentCode.Footman);
        }
        PlayerManager.AddAgentController(controller);
    }
Exemple #4
0
        public void Create()
        {
            var entity = new Agent();

            Console.WriteLine("Enter info about agent:");
            Console.WriteLine("name:");
            entity.name = Console.ReadLine();
            Console.WriteLine("salary:");
            entity.salary = Int32.Parse(Console.ReadLine());

            controller.Create(entity);
        }
 protected override void OnRawExecute(Command com)
 {
     if (com.InputCode == RegisterCode)
     {
         AgentController cont     = AgentController.Create();
         var             agent    = cont.CreateAgent(this._FPSAgentCode, _spawnPos);
         int             playerID = (int)com.GetData <DefaultData> ().Value;
         if (playerID == ClientManager.ClientID)
         {
             PlayerManager.AddController(cont);
             FPSAgent = agent;
             FPSAgent.GetAbility <FPSTurn> ().IsControlling = true;
             cont.AddToSelection(FPSAgent);
         }
     }
 }
    void Start()
    {
        LockstepManager.Initialize();
        GridManager.Generate();
        const int count = 32;


        for (int i = -count; i < count; i++)
        {
            for (int j = -count; j < count; j++)
            {
                if (i * i + j * j < 16)
                {
                    continue;
                }
                if (LSUtility.GetRandom(2) == 0)
                {
                    Vector2d pos = new Vector2d(i, j);
                    GridManager.GetNode(pos.x, pos.y).Unwalkable = true;
                    Instantiate(TestWall).GetComponent <LSBody>().Initialize(pos);
                }
            }
        }

        /*LSBody wall = Instantiate (TestWall).GetComponent<LSBody> ();
         * wall.Initialize (new Vector2d (-32 + 14, 0));
         * for (long i = wall.XMin; i <= wall.XMax; i+= FixedMath.One) {
         *      for (long j = wall.YMin; j <= wall.YMax; j+= FixedMath.One) {
         *              GridManager.GetNode (i, j).Unwalkable = true;
         *      }
         * }*/

        GridManager.Initialize();
        controller = AgentController.Create();
        for (int i = 0; i < 256; i++)
        {
            agent = controller.CreateAgent(AgentCode.Minion);
        }
        PlayerManager.AddAgentController(controller);
    }