Exemple #1
0
        /// <summary>
        /// 增加一个销毁脚本
        ///
        /// 开启一个销毁
        /// </summary>
        /// <returns></returns>
        public static LCSelfDestroy Begin(GameObject go, float dtyTime)
        {
            LCSelfDestroy dest = LCSCompHelper.FindComponet <LCSelfDestroy>(go);

            dest.mDtyTime = dtyTime;
            return(dest);
        }
Exemple #2
0
    /// <summary>
    /// 创建血条
    /// </summary>
    /// <param name="tagert">血条模板 Prefab </param>
    /// <param name="parent">父节点</param>
    /// <returns></returns>
    public static LYXHeroBlood CreateBlood(GameObject tagert, Transform parent)
    {
        GameObject bgo = GameObject.Instantiate(tagert) as GameObject;

        if (bgo == null)
        {
            return(null);
        }
        Transform btrans = bgo.transform;

        if (parent != null)
        {
            btrans.parent = parent;
        }
        btrans.localPosition = Vector3.zero;
        btrans.localRotation = Quaternion.identity;
        btrans.localScale    = Vector3.one;
        LYXHeroBlood blood = LCSCompHelper.FindComponet <LYXHeroBlood>(bgo);

        // 血条
        blood.bloodSlider = btrans.Find("blood/bloodslider").GetComponent <UISlider>();
        //怒气
        blood.angSlider  = btrans.Find("anger/angerslider").GetComponent <UISlider>();
        blood.mBloodTime = 0;
        blood.mIsRefresh = false;
        blood.gameObject.SetActive(false);
        return(blood);
    }
Exemple #3
0
        /// <summary>
        /// 开始堆栈
        /// </summary>
        /// <returns></returns>
        public static LCLogStack Begin()
        {
            // todo: 增加启动 项目开始时设置
            if (_instance != null)
            {
                return(_instance);
            }
            GameObject create = LCSCompHelper.Create("_LOG Stack");

            _instance = LCSCompHelper.FindComponet <LCLogStack>(create);
            Application.RegisterLogCallback(_instance.LogCallback);
            return(_instance);
        }
Exemple #4
0
    /// <summary>
    /// 设置血条的位置
    /// </summary>
    /// <param name="target">血条目标点</param>
    /// <param name="offect">偏移</param>
    public void SetBloodPostion(GameObject target, Vector3 offect)
    {
        if (target == null)
        {
            return;
        }
        LCUIInset3D uiInset = LCSCompHelper.FindComponet <LCUIInset3D>(gameObject);

        if (uiInset == null)
        {
            return;
        }
        uiInset.mOffset = offect;
        uiInset.mTarget = target;
    }
Exemple #5
0
    /// <summary>
    /// 初始化ui 界面
    /// </summary>
    public void InitUIPanel(LYXBattleManage mage, LYXHeroEntity entity)
    {
        _manage         = mage;
        _heroEntity     = entity;
        _isStartRefresh = true;

        // 血条
        bloodSlider = LCSCompHelper.FindComponet <UISlider>(gameObject, "roleblood/blood/bloodslider");
        //怒气
        angSlider  = LCSCompHelper.FindComponet <UISlider>(gameObject, "roleblood/anger/angerslider");
        heroDieSpr = LCSCompHelper.FindComponet <UISprite>(gameObject, "die");

        heroDieSpr.gameObject.SetActive(false);
        mTweenRota         = TweenRotation.Begin(gameObject, 0.1f, Quaternion.identity);
        mTweenRota.enabled = false;
        isHasTween         = false;
    }
Exemple #6
0
        public static LCDelayAction BeginAction(GameObject go, float delayTime, Action action)
        {
            if (go == null && action == null)
            {
                return(null);
            }
            if (go == null || delayTime <= 0)
            {
                action();
                return(null);
            }
            LCDelayAction delact = LCSCompHelper.FindComponet <LCDelayAction>(go);

            delact.mActionBack = action;
            delact.mActionTime = delayTime;
            return(delact);
        }
Exemple #7
0
 /// <summary>
 /// 开始分析
 /// </summary>
 /// <returns></returns>
 public static LCProfiler BeginProfiler(GameObject go)
 {
     return(go == null ? null : LCSCompHelper.FindComponet <LCProfiler>(go));
 }