Ejemplo n.º 1
0
        static StackObject *SetLocator_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.Transform @tran = (UnityEngine.Transform) typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            Main.Combat.UI.HealthBarHUDMonitor instance_of_this_method = (Main.Combat.UI.HealthBarHUDMonitor) typeof(Main.Combat.UI.HealthBarHUDMonitor).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SetLocator(@tran);

            return(__ret);
        }
Ejemplo n.º 2
0
        public void InitHealthBar()
        {
            m_fxHelper = mDMono.gameObject.GetComponent <MoveEditor.FXHelper>();

            if (m_locator == null)
            {
                m_locator = CachedTransform.Find("HealthBarTarget");
            }

            if (m_locator == null)
            {
                if (m_fxHelper != null)
                {
                    m_locator = m_fxHelper.HeadNubTransform;
                }
            }

            if (m_locator == null)
            {
                m_locator = CachedTransform;
            }

            if (m_healthBar == null)
            {
                m_healthBar = Hotfix_LT.UI.HealthBarHUDController.Instance.GetHUD();
            }

            if (m_healthBar == null)
            {
                EB.Debug.LogError("InitHealthBar: m_healthBar is null");
                return;
            }

            if (IsLeft())
            {
                m_healthBar.HpColor = Color.green;
            }
            else if (IsRight())
            {
                m_healthBar.HpColor = Color.red;
            }
            else
            {
                EB.Debug.LogError("InitHealthBar: direction error");
            }

            m_healthBar.MaxHp            = 0;
            m_healthBar.Hp               = 0;
            m_healthBar.TransitionHp     = 0;
            m_healthBar.Shield           = 0;
            m_healthBar.TransitionShield = 0;

            m_healthBarTransform = m_healthBar.mDMono.transform;

            if (m_fxHelper != null)
            {
                m_fxHelper.m_HealthBarFXAttachment = m_healthBar.buffAnchor;
            }

            m_healthBarMonotor = m_healthBar.mDMono.GetComponent <Main.Combat.UI.HealthBarHUDMonitor>();
            m_healthBarMonotor.SetLocator(m_locator);
        }