Exemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Awake()
        {
            const string prefix = "Hovercursor";

            DefaultVisualSettings = UnityUtil.FindComponentOrCreate <HovercursorVisualSettings,
                                                                     HovercursorVisualSettingsStandard>(DefaultVisualSettings, gameObject, prefix);

            Input        = UnityUtil.FindComponentOrFail(Input, prefix);
            CenterCamera = UnityUtil.FindComponentOrFail(CenterCamera, prefix);

            vState = new HovercursorState(Input, DefaultVisualSettings,
                                          CenterCamera.gameObject.transform);

            vPrevActiveCursorTypes = new List <CursorType>();
            vCursorMap             = new Dictionary <CursorType, UiCursor>(EnumIntKeyComparer.CursorType);
            vHideCursorTypes       = new List <CursorType>();
            vShowCursorTypes       = new List <CursorType>();
        }
Exemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Awake()
        {
            const string prefix = "Hovercursor";

            DefaultVisualSettings = UnityUtil.FindComponentOrCreate <HovercursorVisualSettings,
                                                                     HovercursorVisualSettingsStandard>(DefaultVisualSettings, gameObject, prefix);

            Input = UnityUtil.FindComponentOrFail(Input, prefix);

            if (CameraTransform == null)
            {
                CameraTransform = gameObject.transform;
            }

            vState = new HovercursorState(gameObject.transform, Input,
                                          DefaultVisualSettings, CameraTransform);

            vPrevActiveCursorTypes = new CursorType[0];
            vCursorMap             = new Dictionary <CursorType, UiCursor>();
        }