예제 #1
0
        public void RemoveModule(Point position)
        {
            BattleModule module = GetModuleAt(position);

            ModuleList.Remove(module);
            RecalculateMass();
        }
예제 #2
0
        public void AddModule(ModuleData moduleType, Point position, int rotation)
        {
            if (moduleType == null)
            {
                return;
            }
            if (!AreaIsFree(new Rectangle(position, moduleType.Size)))
            {
                return;
            }

            BattleModule module = new BattleModule(moduleType, this, position, rotation);

            ModuleList.Add(module);
            RecalculateMass();
        }
예제 #3
0
 public BattleTurret(BattleModule module, TurretData data)
 {
     Module = module;
     Data   = data;
 }