示例#1
0
 public Upgrade(Vars_Func.UpgradeTyp typ, Vector2 position, Environment.Hexagon hex, Environment.Map map)
 {
     thingTyp      = Vars_Func.ThingTyp.Upgrade;
     this.typ      = typ;
     this.position = position;
     hex.Obj       = this;
     hex.Building  = true;
     for (int i = 0; i < 6; ++i)
     {
         Vector2 neighbor = hex.Neighbors[i];
         map.getHexagonAt(neighbor).Building = true;
     }
 }
示例#2
0
        public void addUpgrade(Vars_Func.UpgradeTyp typ, Vector2 position, Environment.Hexagon hex, Environment.Map map)
        {
            upgrades.Add(new Upgrade(typ, position, hex, map));
            switch (typ)
            {
            case Vars_Func.UpgradeTyp.Damage:
                ++upgradeCount[0];
                break;

            case Vars_Func.UpgradeTyp.Life:
                ++upgradeCount[1];
                break;

            case Vars_Func.UpgradeTyp.Speed:
                ++upgradeCount[2];
                break;
            }
        }