Пример #1
0
        public void addResource(ResourceInfo resInfo)
        {
            string strResType = resInfo.resourceableType;
            Type resType = Type.GetType(strResType);
            Object typeObj = Activator.CreateInstance(resType);

            Player resourceOwner = (from p in campaignEngine.ListPlayers
                                    where p.Id == resInfo.ownerId
                                    select p).First() as Player;

            campaignEngine.ResourceHandler.addRessourcableObject(resourceOwner, (IResourceable)typeObj);
        }
Пример #2
0
 public void addResource(string campaignId, ResourceInfo resinfo)
 {
     CampaignController controller = GcmlDataManager.Instance.getController(campaignId);
     controller.addResource(resinfo);
 }