Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        if (RobotConnector == null)
        {
            RobotConnector = gameObject.GetComponent <RobotConnectionComponent> ();
        }

        switch (HeadControllerType)
        {
        case AppManager.HeadControllerType.Oculus:
            HeadController = new OculusHeadController();
            break;

                        #if STEAMVR_ENABLED
        case AppManager.HeadControllerType.SteamVR:
            HeadController = new SteamVRHeadController();
            break;
                        #endif
        case AppManager.HeadControllerType.Keyboard:
            HeadController = new KeyboardHeadController();
            break;

        case AppManager.HeadControllerType.Custom:
            break;

        default:
            HeadController = new OculusHeadController();
            break;
        }
        switch (BaseControllerType)
        {
        case AppManager.BaseControllerType.None:
            BaseController = null;
            break;

        case AppManager.BaseControllerType.Oculus:
        default:
            BaseController = new OculusBaseController();
            break;
        }


        RobotConnector.AddDependencyNode(this);
    }