private void Start() { _currentState = FirstState; if (FirstState == null) { Debug.LogWarning("No first state was set for object " + name); } }
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; }
/// <summary> /// Change the state of the object /// </summary> /// <param name="state">New state</param> public void SetState(InteractiveObjectState state) { _currentState = state; }
public void UpdateState(InteractiveObjectState state) { this.State = state; this.Map.Engine.Send(this.GetPattern()); }