Esempio n. 1
0
 void UnregisterEventListeners( )
 {
     if (null != local_19_UnityEngine_GameObject)
     {
         {
             uScript_Input component = local_19_UnityEngine_GameObject.GetComponent <uScript_Input>();
             if (null != component)
             {
                 component.KeyEvent -= Instance_KeyEvent_0;
             }
         }
     }
     if (null != event_UnityEngine_GameObject_Instance_7)
     {
         {
             uScript_Update component = event_UnityEngine_GameObject_Instance_7.GetComponent <uScript_Update>();
             if (null != component)
             {
                 component.OnUpdate      -= Instance_OnUpdate_7;
                 component.OnLateUpdate  -= Instance_OnLateUpdate_7;
                 component.OnFixedUpdate -= Instance_OnFixedUpdate_7;
             }
         }
     }
 }
Esempio n. 2
0
 void UnregisterEventListeners( )
 {
     if (null != event_UnityEngine_GameObject_Instance_0)
     {
         {
             uScript_Input component = event_UnityEngine_GameObject_Instance_0.GetComponent <uScript_Input>();
             if (null != component)
             {
                 component.KeyEvent -= Instance_KeyEvent_0;
             }
         }
     }
 }
Esempio n. 3
0
    void RegisterForUnityHooks( )
    {
        SyncEventListeners( );
        //if our game object reference was changed then we need to reset event listeners
        if (local_16_UnityEngine_GameObject_previous != local_16_UnityEngine_GameObject || false == m_RegisteredForEvents)
        {
            //tear down old listeners

            local_16_UnityEngine_GameObject_previous = local_16_UnityEngine_GameObject;

            //setup new listeners
        }
        //if our game object reference was changed then we need to reset event listeners
        if (local_19_UnityEngine_GameObject_previous != local_19_UnityEngine_GameObject || false == m_RegisteredForEvents)
        {
            //tear down old listeners
            if (null != local_19_UnityEngine_GameObject_previous)
            {
                {
                    uScript_Input component = local_19_UnityEngine_GameObject_previous.GetComponent <uScript_Input>();
                    if (null != component)
                    {
                        component.KeyEvent -= Instance_KeyEvent_0;
                    }
                }
            }

            local_19_UnityEngine_GameObject_previous = local_19_UnityEngine_GameObject;

            //setup new listeners
            if (null != local_19_UnityEngine_GameObject)
            {
                {
                    uScript_Input component = local_19_UnityEngine_GameObject.GetComponent <uScript_Input>();
                    if (null == component)
                    {
                        component = local_19_UnityEngine_GameObject.AddComponent <uScript_Input>();
                    }
                    if (null != component)
                    {
                        component.KeyEvent += Instance_KeyEvent_0;
                    }
                }
            }
        }
    }
Esempio n. 4
0
 void SyncEventListeners( )
 {
     if (null == event_UnityEngine_GameObject_Instance_0 || false == m_RegisteredForEvents)
     {
         event_UnityEngine_GameObject_Instance_0 = uScript_MasterComponent.LatestMaster;
         if (null != event_UnityEngine_GameObject_Instance_0)
         {
             {
                 uScript_Input component = event_UnityEngine_GameObject_Instance_0.GetComponent <uScript_Input>();
                 if (null == component)
                 {
                     component = event_UnityEngine_GameObject_Instance_0.AddComponent <uScript_Input>();
                 }
                 if (null != component)
                 {
                     component.KeyEvent += Instance_KeyEvent_0;
                 }
             }
         }
     }
 }
Esempio n. 5
0
   #pragma warning restore 414

    //functions to refresh properties from entities

    void SyncUnityHooks( )
    {
        SyncEventListeners( );
        if (null == logic_uScriptAct_RaycastFromCursor_Camera_8 || false == m_RegisteredForEvents)
        {
            GameObject gameObject = GameObject.Find("/Main Camera");
            if (null != gameObject)
            {
                logic_uScriptAct_RaycastFromCursor_Camera_8 = gameObject.GetComponent <UnityEngine.Camera>();
            }
        }
        if (null == logic_uScriptAct_SpawnPrefab_SpawnPoint_18 || false == m_RegisteredForEvents)
        {
            logic_uScriptAct_SpawnPrefab_SpawnPoint_18 = GameObject.Find("/Player") as UnityEngine.GameObject;
        }
        if (null == local_16_UnityEngine_GameObject || false == m_RegisteredForEvents)
        {
            local_16_UnityEngine_GameObject = GameObject.Find("Player") as UnityEngine.GameObject;
        }
        //if our game object reference was changed then we need to reset event listeners
        if (local_16_UnityEngine_GameObject_previous != local_16_UnityEngine_GameObject || false == m_RegisteredForEvents)
        {
            //tear down old listeners

            local_16_UnityEngine_GameObject_previous = local_16_UnityEngine_GameObject;

            //setup new listeners
        }
        if (null == local_19_UnityEngine_GameObject || false == m_RegisteredForEvents)
        {
            local_19_UnityEngine_GameObject = GameObject.Find("Player") as UnityEngine.GameObject;
        }
        //if our game object reference was changed then we need to reset event listeners
        if (local_19_UnityEngine_GameObject_previous != local_19_UnityEngine_GameObject || false == m_RegisteredForEvents)
        {
            //tear down old listeners
            if (null != local_19_UnityEngine_GameObject_previous)
            {
                {
                    uScript_Input component = local_19_UnityEngine_GameObject_previous.GetComponent <uScript_Input>();
                    if (null != component)
                    {
                        component.KeyEvent -= Instance_KeyEvent_0;
                    }
                }
            }

            local_19_UnityEngine_GameObject_previous = local_19_UnityEngine_GameObject;

            //setup new listeners
            if (null != local_19_UnityEngine_GameObject)
            {
                {
                    uScript_Input component = local_19_UnityEngine_GameObject.GetComponent <uScript_Input>();
                    if (null == component)
                    {
                        component = local_19_UnityEngine_GameObject.AddComponent <uScript_Input>();
                    }
                    if (null != component)
                    {
                        component.KeyEvent += Instance_KeyEvent_0;
                    }
                }
            }
        }
        if (null == owner_Connection_3 || false == m_RegisteredForEvents)
        {
            owner_Connection_3 = parentGameObject;
        }
        if (null == owner_Connection_6 || false == m_RegisteredForEvents)
        {
            owner_Connection_6 = parentGameObject;
        }
    }