Exemplo n.º 1
0
    private void RetrievePlatformTypeCallback(InputAction.CallbackContext ctx)
    {
        string inputButtonType = ctx.control.device.name;

        PlatformType previousPlatformType = m_platformType;

        switch (inputButtonType)
        {
        case "Keyboard":
            m_platformType = PlatformType.KEYBOARD_MOUSE;
            break;

        case "Mouse":
            m_platformType = PlatformType.KEYBOARD_MOUSE;
            break;

        default:
            m_platformType = PlatformType.PS4_CONTROLLER;
            break;
        }

        if (m_platformType != previousPlatformType)
        {
            PlatformChanged?.Invoke(m_platformType);
        }
    }
Exemplo n.º 2
0
 private void OnDisable()
 {
     OnPlatformChanged -= SetPlatform;
     if (platform == Platform.smartphone)
     {
         MazeGenerator.Instance.mazeHolder.SetActive(true);
     }
 }
Exemplo n.º 3
0
    private void OnEnable()
    {
        OnPlatformChanged += SetPlatform;

        // Connect to the vuforia marker to handle marker found and lost functionality
        vuforiaTarget.RegisterTrackableEventHandler(this);
        lookingForMarker.SetActive(true);
        markerFound.SetActive(false);
    }