コード例 #1
0
    public BasicStatusTemplateData(string _strKey, JSONNode nodeData, eStatusData statusType)
    {
        StrKey = _strKey;


        double valueData =
            nodeData[statusType.ToString("F")].AsDouble;

        //기존에 쓰던 방식과 다르게 저장할 것이다.
        Status.IncreaseData(statusType, valueData);
    }
コード例 #2
0
    public ObjectTemplateData(string _strKey, JSONNode nodeData)
    {
        StrKey = _strKey;

        for (int i = 0; i < (int)eStatusData.MAX; i++)
        {
            eStatusData statusData = (eStatusData)i;
            double      valueData  =
                nodeData[statusData.ToString("F")].AsDouble;
            Status.IncreaseData(statusData, valueData);
        }
    }
コード例 #3
0
    //!!
    //private void OnTriggerEnter(Collider other)
    //{
    //	if (other.gameObject.tag == "Enemy")
    //	{
    //		Enemy TargetEnemy =  other.gameObject.GetComponent<Enemy>();
    //		ThrowEvent(ConstValue.ActorData_SetTarget, TargetEnemy);

    //		//스킬이 생성될 때 타켓을 정해주는데, throw이벤트로 타겟을 정해주는 것은 그 후임.
    //		SkillManager.Instance.makeSkill.TARGET = SkillManager.Instance.makeSkill.OWNER.GetData(ConstValue.ActorData_GetTarget) as BaseObject;
    //		//Destroy(other.gameObject);
    //	}
    //}



    //private void OnCollisionEnter(Collision collision)
    //{
    //	if(collision.gameObject.tag=="Enemy")
    //	{
    //		Target.ThrowEvent(ConstValue.ActorData_SetTarget,	collision.gameObject);
    //		Destroy(collision.gameObject);
    //	}
    //}

    public override void basicStatusUp(eStatusData type)
    {
        switch (type)
        {
        case eStatusData.MAX_HP:
            HPStatus++;
            SELF_CHARACTER.CHARACTER_STATUS.AddStatusData(type.ToString(), BasicStatusManager.Instance.Get(type.ToString(), HPStatus).STATUS);

            BaseBoard board = BoardManager.Instance.GetBoardData(this, eBoardType.BOARD_HP);
            if (board != null)
            {
                board.SetData(ConstValue.SetData_HP,
                              GetStatusData(eStatusData.MAX_HP),
                              SELF_CHARACTER.CURRENT_HP);
            }

            //// Board 초기화
            board = null;

            break;

        case eStatusData.ATTACK:
            APStatus++;
            SELF_CHARACTER.CHARACTER_STATUS.AddStatusData(type.ToString(), BasicStatusManager.Instance.Get(type.ToString(), APStatus).STATUS);

            break;

        case eStatusData.DEFENCE:
            DPStatus++;
            SELF_CHARACTER.CHARACTER_STATUS.AddStatusData(type.ToString(), BasicStatusManager.Instance.Get(type.ToString(), DPStatus).STATUS);
            break;

        default:
            break;
        }

        Debug.Log("스테이터스 업! -> " + type.ToString() + "이" + SELF_CHARACTER.CHARACTER_STATUS.GetStatusData(type));
    }
コード例 #4
0
    public BuffTemplateData(string strKey, JSONNode nodeData)
    {
        StrKey = strKey;
        Heal   = nodeData["HEAL"].AsFloat;
        Time   = nodeData["TIME"].AsFloat;

        //Image = nodeData["IMAGE"];
        //	Category = nodeData["CATEGORY"];

        for (int i = 0; i < (int)eStatusData.MAX; i++)
        {
            eStatusData eStatus   = (eStatusData)i;
            double      valueData =
                nodeData[eStatus.ToString()].AsDouble;
            StatusData.IncreaseData(eStatus, valueData);
        }
    }
コード例 #5
0
ファイル: ItemInfo.cs プロジェクト: dmsrlsla/KnightMare
    public ItemInfo(string _strKey, JSONNode nodeData)
    {
        StrKey   = _strKey;
        ItemName = nodeData["NAME"];
        //	SlotType = (eSlotType)nodeData["SLOT_TYPE"].AsInt;

        for (int i = 0; i < (int)eStatusData.MAX; i++)
        {
            eStatusData status    = (eStatusData)i;
            double      valueData = nodeData[status.ToString()].AsDouble;
            if (valueData > 0)
            {
                Status.IncreaseData(status, valueData);
            }
        }

        ItemImage = nodeData["IMAGE"];
    }
コード例 #6
0
    public CharacterTemplateData(string _strKey, JSONNode nodeData)
    {
        StrKey = _strKey;

        for (int i = 0; i < (int)eStatusData.MAX; i++)
        {
            eStatusData statusData = (eStatusData)i;
            double      valueData  =
                nodeData[statusData.ToString("F")].AsDouble;
            Status.IncreaseData(statusData, valueData);
        }

        JSONArray arrSkill = nodeData["SKILL"].AsArray;

        if (arrSkill != null)
        {
            for (int i = 0; i < arrSkill.Count; i++)
            {
                ListSkill.Add(arrSkill[i]);
            }
        }
    }
コード例 #7
0
    public SkillTemplate(string _strKey, JSONNode nodeData)
    {
        StrKey = _strKey;

        SKillType = (eSkillTemplateType)nodeData["SKILL_TYPE"].AsInt;
        RangeType = (eSkillAttackRangeType)nodeData["RANGE_TYPE"].AsInt;

        RangeData_1   = nodeData["RANGE_DATA_1"].AsFloat;
        RangeData_2   = nodeData["RANGE_DATA_2"].AsFloat;
        RangeData_3   = nodeData["RANGE_DATA_3"].AsFloat;
        RangeCenter_1 = nodeData["RANGE_CENTER_1"].AsFloat;        // 건희 06/27
        RangeCenter_2 = nodeData["RANGE_CENTER_2"].AsFloat;
        RangeCenter_3 = nodeData["RANGE_CENTER_3"].AsFloat;

        for (int i = 0; i < (int)eStatusData.MAX; i++)
        {
            eStatusData statusData = (eStatusData)i;
            double      valueData  = nodeData[statusData.ToString()].AsDouble;
            if (valueData > 0)
            {
                SkillStatus.IncreaseData(statusData, valueData);
            }
        }
    }