예제 #1
0
    void Awake()
    {
        MouseX = -1;
        MouseY = -1;

        m_System = CoherentUISystem.Instance;

        m_CoherentMethods = new List <CoherentMethodBindingInfo>();
        if (EnableBindingAttribute)
        {
            RegisterMethodsForBinding();
        }
        m_Listener = new UnityViewListener(this, this.m_Width, this.m_Height);
        m_Listener.ReadyForBindings += this.ReadyForBindings;
        m_Listener.BindingsReleased += this.BindingsReleased;
        IsReadyForBindings           = false;
#if !UNITY_EDITOR && UNITY_ANDROID
        m_Listener.NewTouchEvent += (id, phase, x, y) =>
        {
            CoherentUI.InputManager.ProcessTouchEvent(id, phase,
                                                      x + this.XPos, y + this.YPos);
        };
#endif

        m_Camera = GetComponent <Camera>();

        m_System.UISystemDestroying += OnDestroy;
        m_System.SystemReady        += OnSystemReady;
        m_System.AddView(this);
    }
예제 #2
0
    void OnDestroy()
    {
        if (m_Listener != null)
        {
            m_Listener.Destroy();
            m_Listener.Dispose();
            m_Listener = null;
        }

        m_System.RemoveView(this);

        if (OnViewDestroyed != null)
        {
            OnViewDestroyed();
        }
    }
    void OnDestroy()
    {
        m_System.UISystemDestroying -= OnDestroy;
        m_System.SystemReady        -= OnSystemReady;

        if (m_Listener != null)
        {
            m_Listener.Destroy();
            m_Listener = null;
        }

        m_System.RemoveView(this);

        if (OnViewDestroyed != null)
        {
            OnViewDestroyed();
        }
    }
예제 #4
0
	void Awake () {
		MouseX = -1;
		MouseY = -1;

		m_System = CoherentUISystem.Instance;

		m_CoherentMethods = new List<CoherentMethodBindingInfo>();
		if (EnableBindingAttribute)
		{
			RegisterMethodsForBinding();
		}
		m_Listener = new UnityViewListener(this, this.m_Width, this.m_Height);
		m_Listener.ReadyForBindings += this.ReadyForBindings;
		m_Listener.BindingsReleased += this.BindingsReleased;
		IsReadyForBindings = false;
#if !UNITY_EDITOR && UNITY_ANDROID
		m_Listener.NewTouchEvent += (id, phase, x, y) => { InputManager.ProcessTouchEvent(id, phase, x + this.XPos, y + this.YPos); };
#endif

		m_Camera = GetComponent<Camera>();

		m_System.UISystemDestroying += OnDestroy;
		m_System.SystemReady += OnSystemReady;
		m_System.AddView(this);
	}
예제 #5
0
	void OnDestroy()
	{
		if(m_Listener != null)
		{
			m_Listener.Destroy();
			m_Listener.Dispose();
			m_Listener = null;
		}

		m_System.RemoveView(this);

		if (OnViewDestroyed != null)
		{
			OnViewDestroyed();
		}
	}
예제 #6
0
	void OnDestroy()
	{
		m_Context.UISystemDestroying -= OnDestroy;
		m_Context.SystemReady -= OnSystemReady;

		if(m_Listener != null)
		{
			m_Listener.Destroy();
			m_Listener = null;
		}

		m_Context.RemoveView(this);

		if (OnViewDestroyed != null)
		{
			OnViewDestroyed();
		}
	}
예제 #7
0
	void Awake () {
		MouseX = -1;
		MouseY = -1;

		m_System = CoherentUISystem.Instance;
		
		m_CoherentMethods = new List<CoherentMethodBindingInfo>();
		if (EnableBindingAttribute)
		{
			RegisterMethodsForBinding();
		}
		m_Listener = new UnityViewListener(this, this.m_Width, this.m_Height);
		m_Listener.ReadyForBindings += this.ReadyForBindings;

		m_Camera = GetComponent<Camera>();

		m_System.UISystemDestroying += OnDestroy;
		m_System.SystemReady += OnSystemReady;
		m_System.AddView(this);
	}