示例#1
0
 private void Start()
 {
     _currentState = FirstState;
     if (FirstState == null)
     {
         Debug.LogWarning("No first state was set for object " + name);
     }
 }
示例#2
0
 public InteractiveObject(Database.Records.MapRecords map, Enums.InteractiveObjectEnum typeID, int cellid, InteractiveObjectState state, bool isInteractive)
 {
     this.Map = map;
     this.TypeID = typeID;
     this.CellID = cellid;
     this.State = state;
     this.IsInteractive = isInteractive;
 }
示例#3
0
 /// <summary>
 /// Change the state of the object
 /// </summary>
 /// <param name="state">New state</param>
 public void SetState(InteractiveObjectState state)
 {
     _currentState = state;
 }
示例#4
0
 public void UpdateState(InteractiveObjectState state)
 {
     this.State = state;
     this.Map.Engine.Send(this.GetPattern());
 }
示例#5
0
 public InteractiveObject(Database.Records.MapRecords map, Enums.InteractiveObjectEnum typeID, int cellid, InteractiveObjectState state, bool isInteractive)
 {
     this.Map           = map;
     this.TypeID        = typeID;
     this.CellID        = cellid;
     this.State         = state;
     this.IsInteractive = isInteractive;
 }
示例#6
0
 public void UpdateState(InteractiveObjectState state)
 {
     this.State = state;
     this.Map.Engine.Send(this.GetPattern());
 }