protected Dictionary <int, AbstractEntity> menuItemList = new Dictionary <int, AbstractEntity>(); // For when selecting item to pick up etc... public AbstractRoguelike(int maxLogEntries) { this.ecs = new BasicEcs(this); this.mapData = new MapData(); this.gameLog = new GameLog(maxLogEntries); new CloseCombatSystem(this.ecs); new MovementSystem(this.ecs, this.mapData); this.CreateData(); this.view = new DefaultRLView(this); this.drawingSystem = new DrawingSystem(this.view, this); this.checkVisibilitySystem = new CheckMapVisibilitySystem(this.ecs, this.mapData); new ShootOnSightSystem(this.ecs, this.checkVisibilitySystem, this.ecs.entities); this.checkVisibilitySystem.process(this.playersUnits); this.damageSystem = new DamageSystem(this.ecs, this.gameLog); this.explosionSystem = new ExplosionSystem(this.ecs, this.checkVisibilitySystem, this.damageSystem, this.mapData, this.ecs.entities); new TimerCountdownSystem(this.ecs, this.explosionSystem); this.pickupItemSystem = new PickupDropSystem(); this.effectsSystem = new EffectsSystem(this.ecs); new ThrowingSystem(this.ecs, this.mapData, this.gameLog); new ShootingSystem(this.ecs, this.gameLog); // Draw screen this.drawingSystem.Process(this.effectsSystem.effects); }
public ExplosionSystem(BasicEcs ecs, CheckMapVisibilitySystem _checkVis, DamageSystem _damageSystem, MapData _mapData, List <AbstractEntity> _entities) : base(ecs, false) { this.mapData = _mapData; this.checkVis = _checkVis; this.damageSystem = _damageSystem; this.entities = _entities; }
public AbstractSystem(BasicEcs _ecs, bool _runEachLoop) { this.ecs = _ecs; this.runEachLoop = _runEachLoop; this.ecs.AddSystem(this); }
public static AbstractEntity CreateAlien(BasicEcs ecs, MapData map_data, int x, int y) { AbstractEntity e = new AbstractEntity("Alien"); e.AddComponent(new PositionComponent(e, map_data, x, y, true, true)); e.AddComponent(new MovementDataComponent()); e.AddComponent(new GraphicComponent('A', RLColor.Green, RLColor.Black, ' ', 10)); e.AddComponent(new AlienComponent()); e.AddComponent(new MobDataComponent(1, 150)); e.AddComponent(new AttackAttackableComponent(30, 30)); ecs.entities.Add(e); return(e); }
public ImpregnatedSystem(BasicEcs ecs, MapData _mapData) : base(ecs, true) { this.mapData = _mapData; }
public EnemyAISystem(BasicEcs ecs) : base(ecs, true) { // todo }
public ThrowingSystem(BasicEcs ecs, MapData _mapData, GameLog log) : base(ecs, false) { this.mapData = _mapData; this.gameLog = log; }
public AbstractSystem(BasicEcs _ecs) { this.ecs = _ecs; this.ecs.AddSystem(this); }
public TimerCountdownSystem(BasicEcs ecs, ExplosionSystem _expl) : base(ecs, true) { this.explosionSystem = _expl; }
public ShadowfireEntityFactory(AbstractRoguelike _game, BasicEcs _ecs, MapData _map_data) : base(_game, _ecs, _map_data) { }
public ActionPointsSystem(BasicEcs ecs) : base(ecs, false) { }
public EffectsSystem(BasicEcs ecs) : base(ecs, false) { }
public CheckMapVisibilitySystem(BasicEcs ecs, MapData _mapData) : base(ecs, false) { this.map_data = _mapData; }
public DamageSystem(BasicEcs ecs, GameLog _log) : base(ecs, false) { this.log = _log; }
public AbstractEntityFactory(AbstractRoguelike _game, BasicEcs _ecs, MapData _map_data) { this.game = _game; this.ecs = _ecs; this.map_data = _map_data; }
public ShootingSystem(BasicEcs ecs, GameLog log) : base(ecs, false) { this.gameLog = log; }
//private DamageSystem damageSystem; public CloseCombatSystem(BasicEcs ecs) : base(ecs, false) /*DamageSystem _damageSystem) { * this.damageSystem = _damageSystem;*/ { }
public MovementSystem(BasicEcs ecs, MapData _map_data) : base(ecs, true) { this.map_data = _map_data; }
public ShootOnSightSystem(BasicEcs ecs, CheckMapVisibilitySystem _cmvs, List <AbstractEntity> _entities) : base(ecs, true) { this.cmvs = _cmvs; this.entities = _entities; }
public JonesTheCatSystem(BasicEcs ecs) : base(ecs, true) { }