コード例 #1
0
ファイル: PlayerEntity.cs プロジェクト: Ziden/Lisergy
 public void PlaceUnitInParty(Unit u, Party newParty)
 {
     if (u.Party != null)
     {
         u.Party.RemoveUnit(u);
     }
     u.Party = newParty;
     newParty.AddUnit(u);
     Log.Debug($"{UserID} moved unit {u.SpecId} to party {newParty.PartyIndex}");
 }
コード例 #2
0
ファイル: GM.cs プロジェクト: AustinMorrell/ADGP-126
        public Party CreateParty(Party create)
        {
            for (int c = 0; c < 5; c++)
            {
                Item item = new Item(10, 0, 0, "Potion");                                                       //Units' Items
                Unit temp = new Unit(5 + c, 20 + c, 20 + c, false, "Good Unit " + (c + 1), 0.0, 10.0, 0, item); //Create instance of the unit
                create.AddUnit(temp);
            }

            return(create);
        }
コード例 #3
0
        public Party CreateParty(Party create, string type) //Function that creates a party for the GM and returns that party.
        {
            for (int c = 0; c < 10; c++)
            {
                Item item = new Item(10, 0, 0, "Potion");                                                        //Units' Items
                Unit temp = new Unit(5 + c, 20 + c, 20 + c, false, type + "Unit" + (c + 1), 0.0, 10.0, 0, item); //Create instance of the unit
                create.AddUnit(temp);
            }

            return(create);
        }
コード例 #4
0
 public void SpawnUnit(FormationUnit spawnUnit, int targetRank)
 {
     Party.AddUnit(spawnUnit, targetRank);
     Ranks.RedistributeParty(Party);
     Overlay.FreeSlot.LockOnUnit(spawnUnit);
 }