Example #1
0
 void OnGUI()
 {
     if (GUI.Button(new Rect(100, 100, 100, 50), "boradcast msg"))
     {
         if (m_curController == null || !(m_curController is BroadcastAcotr))
         {
             m_curController = new BroadcastAcotr();
         }
         m_curController.onClick(-1);
     }
     if (GUI.Button(new Rect(100, 300, 100, 50), "notify msg"))
     {
         if (m_curController == null || !(m_curController is NotifyActor))
         {
             m_curController = new NotifyActor();
         }
         m_curController.onClick(-1);
     }
 }
Example #2
0
	void OnGUI()
	{
		if(GUI.Button(new Rect(100,100,100,50),"boradcast msg"))
		{
			if(m_curController == null || !(m_curController is BroadcastAcotr))
			{
				m_curController = new BroadcastAcotr();
			}
			m_curController.onClick(-1);
		}
		if(GUI.Button(new Rect(100,300,100,50),"notify msg"))
		{
			if(m_curController == null || !(m_curController is NotifyActor))
			{
				m_curController = new NotifyActor();
			}
			m_curController.onClick(-1);
		}
	}