Example #1
0
        public override void UnregisterListener(GameEvent.GameEventHandler eventHandler)
        {
            //if (ReferenceEquals(listener, null))
            //	return;

            switch (_assignmentType)
            {
            case AssignmentType.PersonalVariable:
                if (ReferenceEquals(_instancedVariable, null) || ReferenceEquals(IDToken, null))
                {
                    return;
                }
                _instancedVariable.UnregisterListener(IDToken, eventHandler);
                break;

            case AssignmentType.GlobalVariable:
                if (ReferenceEquals(_globalVariable, null))
                {
                    return;
                }
                _globalVariable.UnregisterListener(eventHandler);
                break;

            case AssignmentType.Constant:
            default:
                return;
            }
        }