public WallDefenceSystem(CastleForm form) { if (form == CastleForm.rectangle) { wall_count = 4; walls = new Wall[4]; walls[0] = new Wall(100, WorldDirection.north, BuildMaterial.stone, 30); walls[1] = new Wall(100, WorldDirection.east, BuildMaterial.stone, 30); walls[2] = new Wall(100, WorldDirection.west, BuildMaterial.stone, 30); walls[3] = new Wall(100, WorldDirection.south, BuildMaterial.stone, 30); tower_count = 4; towers = new Tower[4]; towers[0] = new Tower(100, WorldDirection.north_east, BuildMaterial.stone, 50); towers[1] = new Tower(100, WorldDirection.north_west, BuildMaterial.stone, 50); towers[2] = new Tower(100, WorldDirection.south_east, BuildMaterial.stone, 50); towers[3] = new Tower(100, WorldDirection.south_west, BuildMaterial.stone, 50); } else { wall_count = 0; walls = null; tower_count = 0; towers = null; } moat = new Moat(); }
public GateDefenceSystem(CastleForm form, WorldDirection direct) { moat = new Moat(form); gate = new Gate(direct, BuildMaterial.wood, false); isBridgeDown = false; isTarTrapSet = false; }
public static Castle getInstance(string _name, CastleForm extForm, WorldDirection extPos, CastleForm intForm, WorldDirection intPos, int res_count, int serv_count, int war_count) { if (instance == null) { lock (syncRoot) { if (instance == null) { instance = new Castle(_name, extForm, extPos, intForm, intPos, res_count, serv_count, war_count); } } } return(instance); }
private Castle(string _name, CastleForm extForm, WorldDirection extPos, CastleForm intForm, WorldDirection intPos, int res_count, int serv_count, int war_count) { name = _name; externalDefSys = new ExternalDefenceSystem(extForm, extPos); internalDefSys = new InternalDefenceSystem(intForm, intPos); waterDistribSys = new WaterDistributionSystem(); livingSys = new JustLivingSystem(res_count, serv_count, war_count); comfyLivingSys = new ComfyLivingSystem(); prisonSys = new PrisonSystem(); isUnderAttack = false; isUnderSiege = false; isUnderFeudal = false; currentFeudal = null; }
public ExternalDefenceSystem(CastleForm form, WorldDirection direct) { wallDefSys = new WallDefenceSystem(form); gateDefSys = new GateDefenceSystem(form, direct); isDefenceDown = false; }
public Moat(CastleForm _form) : base() { form = _form; }
public Moat() : base() { form = CastleForm.rectangle; }
public InternalDefenceSystem(CastleForm form, WorldDirection direct) { wallDefSys = new WallDefenceSystem(form); gateDefSys = new GateDefenceSystem(form, direct); donjonTower = new DonjonTower(); }