예제 #1
0
 public void AddGang(Gang gang)
 {
     if (!GangInfos.ContainsKey(gang.ID))
     {
         GangInfos.Add(gang.ID, gang);
     }
 }
예제 #2
0
        public void Initialize()
        {
            Gang gang = new Gang();

            gang.TheColor = GangColor.Blue;
            gang.Location = new Vector3(-5, 0, -5);

            gang.AddSoldierInfo(100010, 20);
            gang.AddSoldierInfo(100010, 20);
            //gang.AddSoldierInfo(100012, 15);
            //gang.AddSoldierInfo(100012, 30);
            //gang.AddSoldierInfo(100012, 30);
            gang.Initialize();
            foreach (var tent in gang.TheArmy.Tents)
            {
                tent.MoveTo(gang.Location);
            }

            AddGang(gang);

            CurGang = gang;

            //CurGang.Economic.SetSelected();

            Gang testGang = new Gang();

            testGang.TheColor = GangColor.Red;
            testGang.Location = new Vector3(30, 0, 30);
            testGang.AddSoldierInfo(100010, 36);
            //testGang.AddSoldierInfo(100010 25);
            //testGang.AddSoldierInfo(100010, 25);
            testGang.Initialize();

            AddGang(testGang);

            foreach (var tent in testGang.TheArmy.Tents)
            {
                tent.MoveTo(testGang.Location);
            }

            AddGangsEnemy(gang.ID, testGang.ID);
        }