Exemplo n.º 1
0
    void RegisterForUnityHooks( )
    {
        SyncEventListeners( );
        //if our game object reference was changed then we need to reset event listeners
        if (local_4_UnityEngine_GameObject_previous != local_4_UnityEngine_GameObject || false == m_RegisteredForEvents)
        {
            //tear down old listeners

            local_4_UnityEngine_GameObject_previous = local_4_UnityEngine_GameObject;

            //setup new listeners
        }
        //reset event listeners if needed
        //this isn't a variable node so it should only be called once per enabling of the script
        //if it's called twice there would be a double event registration (which is an error)
        if (false == m_RegisteredForEvents)
        {
            if (null != owner_Connection_5)
            {
                {
                    uScript_ProxyController component = owner_Connection_5.GetComponent <uScript_ProxyController>();
                    if (null == component)
                    {
                        component = owner_Connection_5.AddComponent <uScript_ProxyController>();
                    }
                    if (null != component)
                    {
                        component.OnHit += Instance_OnHit_0;
                    }
                }
            }
        }
    }
Exemplo n.º 2
0
    //property nodes

    //method nodes
   #pragma warning restore 414

    //functions to refresh properties from entities

    void SyncUnityHooks( )
    {
        SyncEventListeners( );
        //if our game object reference was changed then we need to reset event listeners
        if (local_4_UnityEngine_GameObject_previous != local_4_UnityEngine_GameObject || false == m_RegisteredForEvents)
        {
            //tear down old listeners

            local_4_UnityEngine_GameObject_previous = local_4_UnityEngine_GameObject;

            //setup new listeners
        }
        if (null == owner_Connection_5 || false == m_RegisteredForEvents)
        {
            owner_Connection_5 = parentGameObject;
            if (null != owner_Connection_5)
            {
                {
                    uScript_ProxyController component = owner_Connection_5.GetComponent <uScript_ProxyController>();
                    if (null == component)
                    {
                        component = owner_Connection_5.AddComponent <uScript_ProxyController>();
                    }
                    if (null != component)
                    {
                        component.OnHit += Instance_OnHit_0;
                    }
                }
            }
        }
    }
Exemplo n.º 3
0
 void UnregisterEventListeners( )
 {
     if (null != owner_Connection_5)
     {
         {
             uScript_ProxyController component = owner_Connection_5.GetComponent <uScript_ProxyController>();
             if (null != component)
             {
                 component.OnHit -= Instance_OnHit_0;
             }
         }
     }
 }
Exemplo n.º 4
0
 void Instance_OnHit_0(object o, uScript_ProxyController.ProxyControllerCollisionEventArgs e)
 {
    //fill globals
    event_UnityEngine_GameObject_GameObject_0 = e.GameObject;
    event_UnityEngine_GameObject_Controller_0 = e.Controller;
    event_UnityEngine_GameObject_Collider_0 = e.Collider;
    event_UnityEngine_GameObject_RigidBody_0 = e.RigidBody;
    event_UnityEngine_GameObject_Transform_0 = e.Transform;
    event_UnityEngine_GameObject_Point_0 = e.Point;
    event_UnityEngine_GameObject_Normal_0 = e.Normal;
    event_UnityEngine_GameObject_MoveDirection_0 = e.MoveDirection;
    event_UnityEngine_GameObject_MoveLength_0 = e.MoveLength;
    //relay event to nodes
    Relay_OnHit_0( );
 }