public void Run()
 {
     // Debug is write only DebugBuild.
     logger.Debug("Debug Message");
     // or other logging methods
     logger.Log("Message");
     logger.Exception(new Exception("test exception"));
 }
Beispiel #2
0
    void Start()
    {
        ObservableLogger.Listener.LogToUnityDebug();

        ObservableLogger.Listener
        .Where(_ => _.LogType == LogType.Exception)
        .Subscribe(_ => print(_.Exception.Message));

        _logger.Debug("debug message");
        _logger.Log("log");
        _logger.Exception(new Exception("exception"));
    }
Beispiel #3
0
    void Awake()
    {
        Cursor.lockState = CursorLockMode.Locked;
        InitLogger();
        logger.Log("logger test");
        KeyboardStream = Observable.EveryUpdate()
                         .Where(_ => Input.anyKey)
                         .Select(_ => Input.inputString);

        MoveStream = Observable.EveryUpdate()
                     .Where(_ => Input.anyKey)
                     .Select(_ => moveKeyCodes.Select(x => Input.GetKey(x)).ToList())
                     .Where(x => x.Any(y => y))
                     //.Do(x => Debug.Log(x.Select(y => y.ToString()).Aggregate((k,l) => k+l)))
                     .Select(x => moveVector.Where((y, i) => x[i]).Aggregate((k, l) => (k + l)).normalized);

        MouseMoveStream = Observable.EveryUpdate()
                          .Select(_ => Input.mousePosition)
                          .DistinctUntilChanged();

        InitMouseInput();
    }