Esempio n. 1
0
        public GhostController(Level level, GhostAi ghostAi, int id)
            : base(id)
        {
            this.level = level;
            Name = ghostAi.Name;
            this.ghostAi = ghostAi;

            currentCell = Cell.Empty;
            lastCell = Cell.Empty;

            possibleMoves = new List<Cell>();
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a new Ghost
 /// </summary>
 /// <param name="textureAsset">The path to the texture of this ghost</param>
 /// <param name="startCell">The starting cell for this ghost</param>
 /// <param name="level">The level</param>
 /// <param name="startDirection">The starting direction for this ghost</param>
 /// <param name="speed">The speed in cells per secon</param>
 /// <param name="frameSize">The framesize of a frame from the texture</param>
 /// <param name="color">The default color of this ghost</param>
 /// <param name="ghostAi">The ghostAi for this ghost</param>
 public Ghost(String textureAsset, Cell startCell, Level level, Direction startDirection, float speed, Point frameSize, Color color, GhostAi ghostAi)
     : this(textureAsset, startCell, level, startDirection, speed, frameSize, color, new GhostController(level, ghostAi, 1))
 {
 }