コード例 #1
0
    public static mPopEntry SpawnEntry(PopEntryType popEntryType)
    {
        mPopEntry result = new mPopEntry();

        switch (popEntryType)
        {
        case PopEntryType.beNormalAttacked:
            break;

        case PopEntryType.beNormalBaoJiAttacked:
            break;

        case PopEntryType.baoji:
            break;

        case PopEntryType.shanbi:
            break;

        case PopEntryType.beSkillAttacked:
            break;

        case PopEntryType.beSkillTreat:
            break;

        default:
            break;
        }

        return(result);
    }
コード例 #2
0
    void OnGUI()
    {
        //value = 0;
        //foreach(var popEntry in mPopEntryManagerV2.Instance.mList)
        //{
        //    value += popEntry.list.size;
        //}
        GUI.Label(new Rect(10, 0, 1000, 30), " 当前 pop count " + value);

        if (GUI.Button(new Rect(10, 50, 1000, 30), " pop 数量 +10"))
        {
            for (int i = 0; i < 1; i++)
            {
                if (isPopOrigin)
                {
                    pos = Vector3.zero;
                }
                else
                {
                    pos = posList[UnityEngine.Random.Range(0, posList.Count)].transform.position;
                }

                //PopEntryType[] randomPopType = (PopEntryType[])Enum.GetValues(typeof(PopEntryType));
                PopEntryType mvalue        = popTypes[UnityEngine.Random.Range(0, popTypes.Length)];
                bool         isFacingRight = (UnityEngine.Random.Range(0, 2) == 0? true : false);
                mPopEntryManagerV2.Instance.AddEntry(pos, isFacingRight, mvalue, UnityEngine.Random.Range(10, 100));
            }
        }
    }
コード例 #3
0
    void Update()
    {
        //Debug.Log(Time.timeSinceLevelLoad);

        if (!needAuto)
        {
            return;
        }

        if ((timer -= RealTime.deltaTime) < 0f)
        {
            timer = 0.1f;

            mPopValues = new BetterList <mPopValue>();

            for (int i = 0; i < 100; i++)
            {
                Vector3        pos           = posList[UnityEngine.Random.Range(0, posList.Count)].transform.position;
                PopEntryType[] randomPopType = (PopEntryType[])Enum.GetValues(typeof(PopEntryType));
                PopEntryType   mvalue        = randomPopType[UnityEngine.Random.Range(0, randomPopType.Length)];
                bool           isFacingRight = (UnityEngine.Random.Range(0, 2) == 0 ? true : false);
                mPopEntryManagerV2.Instance.AddEntry(pos, isFacingRight, mvalue, UnityEngine.Random.Range(10, 100));
            }
        }
    }
コード例 #4
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="popTye"></param>
    /// <param name="curve_info"> 轨迹信息 </param>
    /// <param name="pos"> 初始生成位置 </param>
    public void AddEntry(
        PopEntryType popTye,
        mPopEntry_Meta_Info curve_info,
        Vector3 initPos,
        string value)
    {
        mPopEntry newPopEntry = mPopEntry.SpawnEntry(popTye);

        ///设置运行数据
        newPopEntry.curStartTimePoint = RealTime.time;
        newPopEntry.curRuningTime     = 0f;
        newPopEntry.totalRuningTime   = curve_info.getTotalRuningTime;

        newPopEntry.x_offsetCurve = curve_info.x_offsetCurve;
        newPopEntry.y_offsetCurve = curve_info.y_offsetCurve;
        newPopEntry.alphaCurve    = curve_info.alphaCurve;
        newPopEntry.x_scaleCurve  = curve_info.x_scaleCurve;
        newPopEntry.y_scaleCurve  = curve_info.y_scaleCurve;

        newPopEntry.initPos = initPos;

        newPopEntry.popValue = value;

        newPopEntry.OnBeforeAdd();

        mList.Add(newPopEntry);
    }
コード例 #5
0
    public void AddEntry(Vector3 initPos, bool isFacingRight, PopEntryType popType, object value)
    {
        mPopValue _value = new mPopValue();

        _value.pos            = initPos;
        _value.isFacingRright = isFacingRight;
        _value.popType        = popType;
        _value.value          = new List <string>();
        switch (popType)
        {
        case PopEntryType.beNormalAttacked:
            _value.value.Add("-");
            _value.value
            .AddRange(
                ((int)value).ToString().ToCharArray().Select(t => "" + t));
            break;

        case PopEntryType.beNormalBaoJiAttacked:
            _value.value.Add("-");
            _value.value
            .AddRange(
                ((int)value).ToString().ToCharArray().Select(t => "_" + t));
            break;

        case PopEntryType.baoji:
            _value.value.Add("z");
            break;

        case PopEntryType.shanbi:
            _value.value.Add("x");
            break;

        case PopEntryType.beSkillAttacked:
            _value.value.Add("-");
            _value.value
            .AddRange(
                ((int)value).ToString().ToCharArray().Select(t => "" + t));
            break;

        case PopEntryType.beSkillTreat:
            _value.value.Add("+");
            _value.value
            .AddRange(
                ((int)value).ToString().ToCharArray().Select(t => "__" + t));
            break;

        default:
            break;
        }

        pops.Add(_value);
    }
コード例 #6
0
ファイル: mPopEntryV2.cs プロジェクト: daaoling/Vertex_HUD
 bool isMultiply(PopEntryType popEntryType)
 {
     return(popEntryType <= PopEntryType.beSkillTreat);
 }