Beispiel #1
0
    public HeroCfg GetDataByID(int id)
    {
        HeroCfg rowdata = null;

        mDict.TryGetValue(id, out rowdata);
        return(rowdata);
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        Instance = this;
        UIEventListener.Get(mOk).onClick = OnOkBtnClick;

        HeroCfg herocfg = HeroCfgManager.Instance.GetDataByID(1);

        if (herocfg != null)
        {
            mLabel.text = herocfg.Name + "  " + herocfg.AP_Name;
        }
    }
Beispiel #3
0
    public void InitTable()
    {
        string data = ConfigUtil.GetConfigData("/Hero.txt");

        string[] splits = data.Split('\n');
        foreach (string split in splits)
        {
            string line = split.Trim();
            if (line.Length > 0)
            {
                HeroCfg rowdata = new HeroCfg(line);
                mDict.Add(rowdata.ID, rowdata);
            }
            else
            {
                continue;
            }
        }
    }
Beispiel #4
0
    // Use this for initialization
    void Start()
    {
        coco = new HeroTemplate();
        HeroCfg cocoCfg = new HeroCfg();

        cocoCfg.name            = "CoCo";
        cocoCfg.heroType        = HeroType.Strength;
        cocoCfg.baseStrength    = 24.0f;
        cocoCfg.baseDexterity   = 14.0f;
        cocoCfg.baseIntellect   = 18.0f;
        cocoCfg.strengthGrowth  = 3.0f;
        cocoCfg.dexterityGrowth = 1.3f;
        cocoCfg.intellectGrowth = 1.5f;
        cocoCfg.baseDamage      = 26.0f;
        cocoCfg.baseArmor       = 0;
        cocoCfg.BAT             = 1.7f;
        cocoCfg.baseVitality    = 150.0f;
        cocoCfg.baseMana        = 18.0f;
        cocoCfg.damageInteval   = 10;

        coco.Initialize(cocoCfg);

        magina = new HeroTemplate();
        HeroCfg maginaCfg = new HeroCfg();

        maginaCfg.name            = "Magina";
        maginaCfg.heroType        = HeroType.Dexterity;
        maginaCfg.baseStrength    = 20.0f;
        maginaCfg.baseDexterity   = 22.0f;
        maginaCfg.baseIntellect   = 15.0f;
        maginaCfg.strengthGrowth  = 1.2f;
        maginaCfg.dexterityGrowth = 2.8f;
        maginaCfg.intellectGrowth = 1.8f;
        maginaCfg.baseDamage      = 27.0f;
        maginaCfg.baseArmor       = -1.042857f;
        maginaCfg.BAT             = 1.4f;
        maginaCfg.baseVitality    = 150.0f;
        maginaCfg.baseMana        = 15.0f;
        maginaCfg.damageInteval   = 4;

        magina.Initialize(maginaCfg);
    }
Beispiel #5
0
    // Use this for initialization
    void Start()
    {
        coco = new HeroTemplate();
        HeroCfg cocoCfg = new HeroCfg();
        cocoCfg.name = "CoCo";
        cocoCfg.heroType = HeroType.Strength;
        cocoCfg.baseStrength = 24.0f;
        cocoCfg.baseDexterity = 14.0f;
        cocoCfg.baseIntellect = 18.0f;
        cocoCfg.strengthGrowth = 3.0f;
        cocoCfg.dexterityGrowth = 1.3f;
        cocoCfg.intellectGrowth = 1.5f;
        cocoCfg.baseDamage = 26.0f;
        cocoCfg.baseArmor = 0;
        cocoCfg.BAT = 1.7f;
        cocoCfg.baseVitality = 150.0f;
        cocoCfg.baseMana = 18.0f;
        cocoCfg.damageInteval = 10;

        coco.Initialize(cocoCfg);

        magina = new HeroTemplate();
        HeroCfg maginaCfg = new HeroCfg();
        maginaCfg.name = "Magina";
        maginaCfg.heroType = HeroType.Dexterity;
        maginaCfg.baseStrength = 20.0f;
        maginaCfg.baseDexterity = 22.0f;
        maginaCfg.baseIntellect = 15.0f;
        maginaCfg.strengthGrowth = 1.2f;
        maginaCfg.dexterityGrowth = 2.8f;
        maginaCfg.intellectGrowth = 1.8f;
        maginaCfg.baseDamage = 27.0f;
        maginaCfg.baseArmor = -1.042857f;
        maginaCfg.BAT = 1.4f;
        maginaCfg.baseVitality = 150.0f;
        maginaCfg.baseMana = 15.0f;
        maginaCfg.damageInteval = 4;

        magina.Initialize(maginaCfg);
    }
Beispiel #6
0
    public void Initialize(HeroCfg cfg)
    {
        name          = cfg.name;
        heroType      = cfg.heroType;
        baseStrength  = cfg.baseStrength;
        baseDexterity = cfg.baseDexterity;
        baseIntellect = cfg.baseIntellect;

        strengthGrowth  = cfg.strengthGrowth;
        dexterityGrowth = cfg.dexterityGrowth;
        intellectGrowth = cfg.intellectGrowth;
        baseDamage      = cfg.baseDamage;
        baseArmor       = cfg.baseArmor;
        BAT             = cfg.BAT;

        baseVitality  = cfg.baseVitality;
        baseMana      = cfg.baseMana;
        damageInteval = cfg.damageInteval;

        OnLevelChange(1);
        ResetHp();
    }
Beispiel #7
0
    public void Initialize(HeroCfg cfg)
    {
        name = cfg.name;
        heroType = cfg.heroType;
        baseStrength = cfg.baseStrength;
        baseDexterity = cfg.baseDexterity;
        baseIntellect = cfg.baseIntellect;

        strengthGrowth = cfg.strengthGrowth;
        dexterityGrowth = cfg.dexterityGrowth;
        intellectGrowth = cfg.intellectGrowth;
        baseDamage = cfg.baseDamage;
        baseArmor = cfg.baseArmor;
        BAT = cfg.BAT;

        baseVitality = cfg.baseVitality;
        baseMana = cfg.baseMana;
        damageInteval = cfg.damageInteval;

        OnLevelChange(1);
        ResetHp();
    }