public virtual void load(ActorHandler actorhandler) { setActorHandler(actorhandler); foreach (Component c in components) { c.load(this); } }
public override void load(ActorHandler actorhandler) { base.load(actorhandler); this.engine = Program.engine; containerGui = new GUI.ContainerGui(this, "Inventory", engine.screenWidth - 44, 4, 40, 50); this.playerAi = (Components.PlayerAI)getComponent(typeof(Components.PlayerAI)); this.fov = (Components.DynamicFov)getComponent(typeof(Components.DynamicFov)); this.mainToolSlot = (Components.Slot)getComponent(typeof(Components.Slot)); }
public void initialize(bool restarting, int levelnr, Type mapGenerator) { this._levelnr = levelnr; Program.engine.gameStatus = GameStatus.LOADING; map = new Map(this, 4, 4, 100, 50); lightMapConsole = new TCODConsole(map.renderWidth, map.renderHeight); lightMapConsole.setKeyColor(TCODColor.white); actorHandler = new ActorHandler(); actorHandler.initialize(restarting, this); Console.WriteLine("Generating Map..."); map.generate(mapGenerator); Program.engine.gameStatus = GameStatus.IDLE; }
public void setActorHandler(ActorHandler actorHandler) { this.actorHandler = actorHandler; }