Exemplo n.º 1
0
 public void Initialize(GlobalItemSpawnerData data)
 {
     var map = GameServices.Get<GameMap>();
     agents = new List<GlobalItemSpawnerAgent>();
     foreach(var agentData in data.agents)
     {
         agents.Add(new GlobalItemSpawnerAgent(map, agentData));
     }
 }
Exemplo n.º 2
0
        public GlobalItemSpawnerAgent(GameMap map, GlobalItemSpawnerData.Agent data)
        {
            this.map = map;

            minCountPerTurn = data.minCountPerTurn;
            maxCountPerTurn = data.maxCountPerTurn;

            limitCount = data.limitCount;
            unlimitCount = limitCount == 0;

            limitDistanceFromCenter = data.limitDistanceFromCenter;
            unlimitDistanceFromCenter = limitDistanceFromCenter == 0;

            itemPrototype = data.Item;
        }