Exemple #1
0
        // recursively fine the transform include inRoot and the whole hierarchy under the inRoot, this also include the object that is deactivate
        public static Transform SearchHierarchyForBone(Transform inRoot, string inName, bool ignoreDisabled = false)
        {
            if (inRoot == null || inName.Length <= 0)
            {
                return(null);
            }
            // check if the current bone is the bone we're looking for, if so return it
            if (inRoot.name.Equals(inName))
            {
                return(inRoot);
            }

            EB.Collections.Queue <Transform> queue = new EB.Collections.Queue <Transform>(16);
            Transform result = null;

            queue.Enqueue(inRoot);
            while (queue.Count > 0)
            {
                Transform it = queue.Dequeue();
                result = it.Find(inName);
                if (result && (!ignoreDisabled || result.gameObject.activeInHierarchy))
                {
                    return(result);
                }

                int childCount = it.childCount;
                for (int i = 0; i < childCount; ++i)
                {
                    queue.Enqueue(it.GetChild(i));
                }
            }
            return(null);
        }
Exemple #2
0
        static StackObject *Enqueue_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Vector3 @obj = new UnityEngine.Vector3();
            if (ILRuntime.Runtime.Generated.CLRBindings.s_UnityEngine_Vector3_Binding_Binder != null)
            {
                ILRuntime.Runtime.Generated.CLRBindings.s_UnityEngine_Vector3_Binding_Binder.ParseValue(ref @obj, __intp, ptr_of_this_method, __mStack, true);
            }
            else
            {
                @obj = (UnityEngine.Vector3) typeof(UnityEngine.Vector3).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
                __intp.Free(ptr_of_this_method);
            }

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            EB.Collections.Queue <UnityEngine.Vector3> instance_of_this_method = (EB.Collections.Queue <UnityEngine.Vector3>) typeof(EB.Collections.Queue <UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Enqueue(@obj);

            return(__ret);
        }
Exemple #3
0
        private EB.Collections.Queue <Vector3> FindTransferPath(string npc_id, bool allPath, out Vector3 startPoint)
        {
            startPoint = Vector3.zero;
            SceneRootEntry sceneRoot = SceneLoadManager.GetSceneRoot(SceneLoadManager.CurrentSceneName);

            if (sceneRoot == null)
            {
                EB.Debug.LogError("sceneRoot is null");
                return(null);
            }

            Transform pathRoot = sceneRoot.m_SceneRoot.transform.GetComponentInChildren <LevelHelper>().transform.Find("TransportPaths/" + npc_id);

            startPoint = new Vector3(pathRoot.GetChild(0).position.x, mDMono.transform.position.y, pathRoot.GetChild(0).position.z);
            EB.Collections.Queue <Vector3> posQue = new EB.Collections.Queue <Vector3>();

            int nextpointIndex = AlliancesManager.Instance.TransferDartInfo.NextTransferPoint;

            if (allPath)
            {
                nextpointIndex = pathRoot.childCount - 2;
            }
            //else nextpointIndex = nextpointIndex == 0 ? 0 : nextpointIndex-1;//没到第一个检查点强行设置为第一个
            float localPlayerY = mDMono.transform.position.y;

            for (int pointindex = pathRoot.childCount - nextpointIndex - 1; pointindex < pathRoot.childCount; ++pointindex)
            {
                Transform t   = pathRoot.GetChild(pointindex);
                Vector3   pos = new Vector3(t.position.x, localPlayerY, t.position.z);
                posQue.Enqueue(pos);
            }
            return(posQue);
        }
Exemple #4
0
 private void Initialize()
 {
     m_ManagedNpcs      = new Dictionary <string, NpcDelegate>();
     m_NpcQueue         = new EB.Collections.Queue <NpcDelegate>();
     m_IsCanShow        = false;
     m_GroupCellManager = new GroupCellManager();
 }
Exemple #5
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            HelpOtherBtn              = t.GetComponent <UIButton>("Escort/HelpOtherBtn");
            TransferDartingFlag       = t.FindEx("Escort/EscortingFlag").gameObject;
            TranferDartCountdownLabel = t.GetComponent <UILabel>("Escort/EscortingFlag/Countdown");
            QueueSize = 50;

            t.GetComponent <UIButton>("Escort/HelpOtherBtn").onClick.Add(new EventDelegate(OnHandleOtherHelpReqBtnClick));
            t.GetComponent <UIEventTrigger>("Escort/EscortingFlag").onClick.Add(new EventDelegate(OnRequestHelpBtnClick));

            m_Instance     = this;
            m_MessageQueue = new EB.Collections.Queue <InvitesMessage>(QueueSize);

            var im = LTHotfixManager.GetManager <InvitesManager>();

            im.OnAcceptListener       += OnAcceptListener;
            im.OnRejectListener       += OnRejectListener;
            im.OnInviteListener       += OnInviteListener;
            im.OnRequestListener      += OnRequestListener;
            im.OnRemoveTargetListener += OnRemoveTargetListener;
            im.OnRemoveInviteListener += OnRemoveInviteListener;
        }
Exemple #6
0
 public ThreadPool(int maxThreads)
 {
     _maxThreads = maxThreads;
     _queue      = new EB.Collections.Queue <AsyncTask>(16);
     _event      = new System.Threading.AutoResetEvent(false);
     Start();
 }
Exemple #7
0
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *__ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new EB.Collections.Queue <System.String>();

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Exemple #8
0
        private void Initialize()
        {
            m_RegionPlayers  = new Dictionary <long, PlayerDelegate>();
            m_SpcialPlayers  = new Dictionary <long, PlayerDelegate>();
            m_ManagedPlayers = new Dictionary <long, PlayerDelegate>();
            m_PlayerQueue    = new EB.Collections.Queue <PlayerDelegate>();
            int SettingPlayerNum = global::UserData.PlayerNum;

            m_MaxManagedPlayer = SettingPlayerNum;
            m_IsCanShow        = false;
        }
Exemple #9
0
        static StackObject *Dequeue_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            EB.Collections.Queue <System.String> instance_of_this_method = (EB.Collections.Queue <System.String>) typeof(EB.Collections.Queue <System.String>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Dequeue();

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Exemple #10
0
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @capacity = ptr_of_this_method->Value;


            var result_of_this_method = new EB.Collections.Queue <System.Object>(@capacity);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Exemple #11
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            m_FloatingManager = t.GetMonoILRComponent <FloatingUIManager>("FloatingText");
            m_DelayTime       = 0.75f;
            m_DataQueueSize   = 20;
            m_CoroutineNum    = 0;

            m_instance  = this;
            m_DataQueue = new EB.Collections.Queue <object>(m_DataQueueSize);
        }
Exemple #12
0
        static StackObject *Enqueue_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.String @obj = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            EB.Collections.Queue <System.String> instance_of_this_method = (EB.Collections.Queue <System.String>) typeof(EB.Collections.Queue <System.String>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Enqueue(@obj);

            return(__ret);
        }
Exemple #13
0
        static StackObject *Dequeue_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            EB.Collections.Queue <UnityEngine.Transform> instance_of_this_method = (EB.Collections.Queue <UnityEngine.Transform>) typeof(EB.Collections.Queue <UnityEngine.Transform>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Dequeue();

            object obj_result_of_this_method = result_of_this_method;

            if (obj_result_of_this_method is CrossBindingAdaptorType)
            {
                return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance));
            }
            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Exemple #14
0
        static StackObject *Peek_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            EB.Collections.Queue <UnityEngine.Vector3> instance_of_this_method = (EB.Collections.Queue <UnityEngine.Vector3>) typeof(EB.Collections.Queue <UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Peek();

            if (ILRuntime.Runtime.Generated.CLRBindings.s_UnityEngine_Vector3_Binding_Binder != null)
            {
                ILRuntime.Runtime.Generated.CLRBindings.s_UnityEngine_Vector3_Binding_Binder.PushValue(ref result_of_this_method, __intp, __ret, __mStack);
                return(__ret + 1);
            }
            else
            {
                return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
            }
        }
Exemple #15
0
        private IEnumerator WaitforRegisterGameobject(string npc_id, bool allPath)
        {
            Vector3 startPoint;

            EB.Collections.Queue <Vector3> posQue = FindTransferPath(npc_id, allPath, out startPoint);
            if (allPath)
            {
                mDMono.transform.position = startPoint;
                Vector3 newPos = mDMono.transform.position;
                float   newDir = mDMono.transform.rotation.eulerAngles.y;
                ((SceneManager)LTHotfixManager.GetManager("SceneManager")).UpdatePlayerMovement(MainLandLogic.GetInstance().SceneId, newPos, newDir, null);
            }
            mDMono.transform.LookAt(posQue.Peek());

            while (!PlayerManager.IsLocalPlayer(mDMono.gameObject) || !SceneLogic.FuncNpcLoadCompleted)//确保NPC加载完成再寻路
            {
                yield return(null);
            }
            playerController.TargetingComponent.SetMovementTargetQueue(posQue, delegate() {
                ChangeLeaderModel();
            });
        }
Exemple #16
0
        static StackObject *SetMovementTargetQueue_6(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Action @onEndCallback = (System.Action) typeof(System.Action).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            EB.Collections.Queue <UnityEngine.Vector3> @movePosQue = (EB.Collections.Queue <UnityEngine.Vector3>) typeof(EB.Collections.Queue <UnityEngine.Vector3>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            global::CharacterTargetingComponent instance_of_this_method = (global::CharacterTargetingComponent)typeof(global::CharacterTargetingComponent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetMovementTargetQueue(@movePosQue, @onEndCallback);

            return(__ret);
        }
Exemple #17
0
 private WorldMapPathManager()
 {
     m_Queue       = new EB.Collections.Queue <PathProcessNode>();
     m_PathFinder  = new WorldMapPathFinder();
     m_CurrentNode = null;
 }