/*--------------------------------------------------------------------------------------------*/
        private void TryInitCursor(CursorType pType)
        {
            if (vCursorStateMap.ContainsKey(pType))
            {
                return;
            }

            var cursor = new CursorState(Input.GetCursor(pType), VisualSettings.GetSettings());

            vCursorStateMap.Add(pType, cursor);
            vCursorStates.Add(cursor);
            vActiveCursorTypes.Add(pType);
        }
Пример #2
0
        /*--------------------------------------------------------------------------------------------*/
        private void TryInitCursor(CursorType pType)
        {
            if (vCursorMap.ContainsKey(pType))
            {
                return;
            }

            var cursor = new CursorState(Input.GetCursor(pType), VisualSettings.GetSettings(), vBaseTx);

            vCursorMap.Add(pType, cursor);

            ActiveCursorTypes = ActiveCursorTypes
                                .Concat(new[] { pType })
                                .ToArray();
        }
Пример #3
0
        /*--------------------------------------------------------------------------------------------*/
        public void UpdateAfterInput()
        {
            IHovercursorDelegate[] activeDelegates = GetActiveDelegates();

            foreach (CursorType type in vCursorMap.Keys)
            {
                CursorState cursor       = vCursorMap[type];
                float       maxDispStren = 0;
                var         interacts    = new List <IBaseItemInteractionState>();

                foreach (IHovercursorDelegate del in activeDelegates)
                {
                    if (!del.ActiveCursorTypes.Contains(type))
                    {
                        continue;
                    }

                    maxDispStren = Math.Max(maxDispStren, del.CursorDisplayStrength);
                    interacts.AddRange(del.GetActiveCursorInteractions(type));
                }

                cursor.UpdateAfterInput(maxDispStren, interacts.ToArray());
            }
        }
		/*--------------------------------------------------------------------------------------------*/
		private void TryInitCursor(CursorType pType) {
			if ( vCursorStateMap.ContainsKey(pType) ) {
				return;
			}

			var cursor = new CursorState(Input.GetCursor(pType), VisualSettings.GetSettings(), vBaseTx);

			vCursorStateMap.Add(pType, cursor);
			vCursorStates.Add(cursor);
			vActiveCursorTypes.Add(pType);
		}
        /*--------------------------------------------------------------------------------------------*/
        private void TryInitCursor(CursorType pType)
        {
            if ( vCursorMap.ContainsKey(pType) ) {
                return;
            }

            var cursor = new CursorState(Input.GetCursor(pType), VisualSettings.GetSettings(), vBaseTx);
            vCursorMap.Add(pType, cursor);

            ActiveCursorTypes = ActiveCursorTypes
                .Concat(new[] { pType })
                .ToArray();
        }