Ejemplo n.º 1
0
 void OnEnable()
 {
     if (cam == null || visor == null)
     {
         BurstDebug.LogWarning("Cam or visor net set in MonoMouse on object " + name + ", disabling");
         enabled = false;
     }
 }
Ejemplo n.º 2
0
 private void Start()
 {
     if (rb == null)
     {
         BurstDebug.LogWarning("Rigidbody is not set on object " + name);
         enabled = false;
     }
 }
Ejemplo n.º 3
0
    private void OnEnable()
    {
        if (controls != null)
        {
            controls.Player.Enable();
        }

        else
        {
            BurstDebug.LogWarning("Object enabled without a PlayerControls reference, this could cause unintentional side effects");
        }
    }
Ejemplo n.º 4
0
    protected override void OnUpdate()
    {
        if (MonoInputManager.instance == null)
        {
            BurstDebug.LogWarning("Waiting for MonoInputManager");
            return;
        }

        MonoInputManager inputMan = MonoInputManager.instance;

        Entities.ForEach((ref InputStruct input) =>
        {
            input.moveRaw = inputMan.move;
            input.move    = inputMan.smoothedMove;

            input.mouseX = inputMan.mouse.x;
            input.mouseY = inputMan.mouse.y;
            input.alt    = inputMan.alt;

            //input.shift = Input.GetKey(KeyCode.LeftShift);
            input.jump = inputMan.jump;
        });
    }