예제 #1
0
        /// <summary>
        ///     Execute the system immediately.
        /// </summary>
        public void Update()
        {
#if UNITY_EDITOR
            m_Sampler?.Begin();
#endif
            InternalUpdate();

#if UNITY_EDITOR
            m_Sampler?.End();
#endif
        }
예제 #2
0
        static StackObject *End_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.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);
            UnityEngine.Profiling.CustomSampler instance_of_this_method = (UnityEngine.Profiling.CustomSampler) typeof(UnityEngine.Profiling.CustomSampler).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.End();

            return(__ret);
        }
예제 #3
0
        private bool IsCanAttack(Actor attacker, Actor defender, ref bool show_tips)
        {
            if (attacker == null)
            {
                return(false);
            }
            if (defender == null)
            {
                return(false);
            }

            sampler.Begin();
            bool is_enemy = IsEnemyRelation(attacker, defender, ref show_tips);

            sampler.End();

            if (is_enemy == false)
            {
                if (show_tips)
                {
                    bool is_friend = IsFriendRelation(attacker, defender);
                    if (is_friend)
                    {
                        show_tips = false;
                        ShowMessage(xc.DBConstText.GetText("SKILL_CANNT_ATTACK_FRIEND"));
                    }
                }
                return(false);
            }
            if (defender.CanBeHited() == false)
            {//defender不可以被攻击
                if (show_tips)
                {
                    if (defender.IsPlayer() && defender.BuffCtrl != null && defender.BuffCtrl.HasActive(m_gamePKReviveBuffId))
                    {
                        ShowMessage(xc.DBConstText.GetText("TRY_ATTACK_PLAYER_IN_REVIVE_BUFF"));
                    }
                    else
                    {//目标处于不可攻击状态
                        ShowMessage(xc.DBConstText.GetText("TRY_ATTACK_TARGET_IN_CANT_BE_HITED"));
                    }
                    show_tips = false;
                }
                return(false);
            }
            return(true);
        }
        static int _m_End(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.Profiling.CustomSampler __cl_gen_to_be_invoked = (UnityEngine.Profiling.CustomSampler)translator.FastGetCSObj(L, 1);


            try {
                {
                    __cl_gen_to_be_invoked.End(  );



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
예제 #5
0
 public void Dispose()
 {
     _sampler.End();
 }