more selection fixes
[potlatch2.git] / net / systemeD / potlatch2 / controller / ControllerState.as
1 package net.systemeD.potlatch2.controller {
2         import flash.events.*;
3     import net.systemeD.halcyon.Map;
4     import net.systemeD.halcyon.connection.*;
5     import net.systemeD.potlatch2.EditController;
6         import net.systemeD.halcyon.Globals;
7
8     public class ControllerState {
9
10         protected var controller:EditController;
11         protected var previousState:ControllerState;
12
13         public function ControllerState() {}
14  
15         public function setController(controller:EditController):void {
16             this.controller = controller;
17         }
18
19         public function setPreviousState(previousState:ControllerState):void {
20             if ( this.previousState == null )
21                 this.previousState = previousState;
22         }
23    
24         public function processMouseEvent(event:MouseEvent, entity:Entity):ControllerState {
25             return this;
26         }
27         
28         public function processKeyboardEvent(event:KeyboardEvent):ControllerState {
29             return this;
30         }
31
32                 public function get map():Map {
33                         return controller.map;
34                 }
35
36         public function enterState():void {}
37         public function exitState():void {}
38
39                 public function toString():String {
40                         return "(No state)";
41                 }
42
43     }
44 }