示例#1
0
 void Awake()
 {
     _instance       = this;
     _current_step   = 0;
     _number_of_foes = 0;
     room_change_events.Add(new RoomChangeEvent(1, 0));
 }
示例#2
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());
    }
示例#3
0
    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") + ")";
    }