void Awake() { _instance = this; _current_step = 0; _number_of_foes = 0; room_change_events.Add(new RoomChangeEvent(1, 0)); }
public override void OnInspectorGUI() { DrawDefaultInspector(); PlayerStateHistory script = (PlayerStateHistory)target; GUILayout.Box("Steps: " + PlayerStateHistory.CURRENT_STEP.ToString()); GUILayout.Box("Foes: " + PlayerStateHistory.NUMBER_OF_FOES.ToString()); GUILayout.Box("Current Occupied Rooms: " + Player.CURRENT_OCCUPIED_ROOM.ToString()); GUILayout.Box("Time Ratio: " + PlayerStateHistory.STEP_TIME_RATIO.ToString()); }
public void UpdateLocationState() { LocationState new_state; new_state.pos = transform.position; new_state.facing = transform.rotation; int new_room_id = GetRoomId(); new_state.room_id = new_room_id; _last_location_state = _current_location_state; _current_location_state = new_state; if (CURRENT_LOCATION_STATE.room_id != new_room_id) { PlayerStateHistory.PlayerRoomChangeEvent(); } DebugText.player_room_text = new_room_id.ToString() + " (" + Time.time.ToString("0") + ")"; }