public XMLController(string read_fname, string write_fname, PlayerController pc, ObstacleController oc, ItemController ic, NPCController nc) : this() { this.read_fname = read_fname; this.write_fname = write_fname; this.playerController = pc; this.obstacleController = oc; this.itemController = ic; this.npcController = nc; }
public ObstacleInteractionController(ObstacleController oc, PlayerController pc) { this.obstacleController = oc; this.playerController = pc; }
private void InitializeControllers() { displayController = new DisplayController(); npcController = new NPCController(); playerController = new PlayerController(); itemController = new ItemController(); obstacleController = new ObstacleController(); levelController = new LevelController(); entityGenerationController = new EntityGenerationController(); xmlController = new XMLController(); tileController = new TileController(); collisionController = new CollisionController(); //set collision controller collisionController.tileController = tileController; //set entity generation controller entityGenerationController.itemController = itemController; entityGenerationController.npcController = npcController; entityGenerationController.obstacleController = obstacleController; //set xmlController xmlController.playerController = playerController; xmlController.npcController = npcController; xmlController.obstacleController = obstacleController; xmlController.itemController = itemController; //set tile controller tileController.itemController = itemController; tileController.npcController = npcController; tileController.obstacleController = obstacleController; tileController.max_game_height = MAX_GAME_HEIGHT; tileController.max_game_width = MAX_GAME_WIDTH; tileController.tileSize = PlayerController.SPRITE_SIZE; npcController.tileController = tileController; itemController.tileController = tileController; obstacleController.tileController = tileController; tileController.InitializeTiles(); //set player controller playerController.itemController = itemController; playerController.collisionController = collisionController; playerController.obstacleController = obstacleController; //set level controller levelController.itemController = itemController; levelController.obstacleController = obstacleController; levelController.playerController = playerController; levelController.npcController = npcController; levelController.tileController = tileController; levelController.xmlController = xmlController; //set npc controller npcController.collisionController = collisionController; }