UICamera.Notify C# (CSharp) Method

Notify() static public method

Generic notification function. Used in place of SendMessage to shorten the code and allow for more than one receiver.
static public Notify ( GameObject go, string funcName, object obj ) : void
go GameObject
funcName string
obj object
return void
	static public void Notify (GameObject go, string funcName, object obj)
	{
		if (go != null)
		{
			go.SendMessage(funcName, obj, SendMessageOptions.DontRequireReceiver);

			if (genericEventHandler != null && genericEventHandler != go)
			{
				genericEventHandler.SendMessage(funcName, obj, SendMessageOptions.DontRequireReceiver);
			}
		}
	}

Usage Example

Example #1
0
    protected virtual void OnPress(Boolean isDown)
    {
        if (this.KeyCommand != Control.None && UIKeyTrigger.IsOnlyTouchAndLeftClick())
        {
            if (isDown)
            {
                UIManager.Input.SendKeyCode(this.KeyCommand, false);
                PersistenSingleton <HonoInputManager> .Instance.SetInputDownSources(SourceControl.Touch, this.KeyCommand);

                Singleton <DialogManager> .Instance.PressMesId = PersistenSingleton <UIManager> .Instance.Dialogs.CurMesId;
            }
            else
            {
                this.isPress = false;
                Boolean flag = false;
                if (UICamera.currentTouchID == -1)
                {
                    flag = true;
                }
                else if (UICamera.currentTouchID > -1 && UICamera.currentTouchID < 2)
                {
                    flag = (!(this.buttonGroupState != (UnityEngine.Object)null) || this.buttonGroupState.ProcessTouch());
                }
                if (flag)
                {
                    UICamera.Notify(PersistenSingleton <UIManager> .Instance.gameObject, "OnScreenButtonPressed", base.gameObject);
                }
                UIManager.Input.ResetKeyCode();
                Singleton <DialogManager> .Instance.ReleaseMesId = PersistenSingleton <UIManager> .Instance.Dialogs.CurMesId;
            }
        }
    }
All Usage Examples Of UICamera::Notify