示例#1
0
        public void Dispose()
        {
            InteractiveObjectCursorScreenIntersectionManager.Get().UnRegisterOnCursorOverObjectEvent(this.OnCursorOverObject);
            InteractiveObjectCursorScreenIntersectionManager.Get().UnRegisterOnCursorNoMoreOverObjectEvent(this.OnCursorNoMoreOverObject);

            foreach (var selectableTargettedInteractiveObject in AllSelectableTargettedInteractiveObject)
            {
                selectableTargettedInteractiveObject.UnRegisterInteractiveObjectDestroyedEventListener(this.OnCurrentlyTargettedInteractiveObjectDestroyed);
            }
        }
示例#2
0
        public FiringLockSelectionSystem(Action <CoreInteractiveObject> OnNewInteractiveObjectTargettedCallback)
        {
            this.GameInputManager = GameInputManager.Get();
            this.AllSelectableTargettedInteractiveObject = new List <CoreInteractiveObject>();
            this.OnNewInteractiveObjectTargettedCallback = OnNewInteractiveObjectTargettedCallback;
            this.CurrentlyTargettedInteractiveObject     = default;

            this.CurrentlyTargettedInteractiveObject = new ObjectVariable <CoreInteractiveObject>(
                OnObjectValueChanged: this.OnCurrentlytargettedObjectChanged
                );
            this.InitializeEvents();

            /// Initialization
            foreach (var cursorIntersectedInteractiveObject in InteractiveObjectCursorScreenIntersectionManager.Get().IntersectingInteractiveObjects)
            {
                this.OnCursorOverObject(cursorIntersectedInteractiveObject);
            }
        }
示例#3
0
 private void InitializeEvents()
 {
     InteractiveObjectCursorScreenIntersectionManager.Get().RegisterOnCursorOverObjectEvent(this.OnCursorOverObject);
     InteractiveObjectCursorScreenIntersectionManager.Get().RegisterOnCursorNoMoreOverObjectEvent(this.OnCursorNoMoreOverObject);
 }