예제 #1
0
        /* Functions */

        protected virtual void Awake()
        {
            // try to get the action component by itself.
            if (mInvincibleTimeAction == null)
            {
                mInvincibleTimeAction = this.GetComponent <JCS_InvincibleTimeAction>();
            }

            // Auto add, for better design plz
            // add "JCS_LiquidBarInfo" manually.
            if (mHPInfo == null)
            {
                mHPInfo = this.gameObject.AddComponent <JCS_LiquidBarInfo>();
            }
            mHPInfo.TagName = "HP";


            if (mMPInfo == null)
            {
                mMPInfo = this.gameObject.AddComponent <JCS_LiquidBarInfo>();
            }
            mMPInfo.TagName = "MP";


            if (mEXPInfo == null)
            {
                mEXPInfo = this.gameObject.AddComponent <JCS_LiquidBarInfo>();
                mEXPInfo.CurrentValue = 0;
            }
            mEXPInfo.TagName = "EXP";
        }
예제 #2
0
 /// <summary>
 /// Attach 2d live object so it will follow the
 /// value from this object.
 /// </summary>
 /// <param name="obj"> Info for liquid bar to follow. </param>
 public void AttachInfo(JCS_LiquidBarInfo info)
 {
     mLiquidBar.AttachInfo(info);
 }
예제 #3
0
        /// <summary>
        /// Attach 2d live object so it will follow the
        /// value from this object.
        /// </summary>
        /// <param name="obj"> Info for liquid bar to follow. </param>
        public override void AttachInfo(JCS_LiquidBarInfo info)
        {
            this.mInfo = info;

            UpdateInfo();
        }
예제 #4
0
        //========================================
        //      Interface-Define
        //------------------------------

        /// <summary>
        /// Attach 2d live object so it will follow the
        /// value from this object.
        /// </summary>
        /// <param name="obj"> Info for liquid bar to follow. </param>
        public abstract void AttachInfo(JCS_LiquidBarInfo info);