Esempio 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);
        }
    }
Esempio n. 2
0
 private void OnDisable()
 {
     OnPlatformChanged -= SetPlatform;
     if (platform == Platform.smartphone)
     {
         MazeGenerator.Instance.mazeHolder.SetActive(true);
     }
 }
Esempio 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);
    }