Esempio n. 1
0
 public PlayerStats(PlayerStatsData data)
 {
     Speed        = data.Speed;
     PlayerSkill  = SkillGenerator.GeneratePlayerSkill(data.movementSkill);
     AngularForce = data.AngularForce;
     JumpVector   = data.JumpVector;
 }
Esempio n. 2
0
    void Start()
    {
        _pokemonsDataList = LoadDictListFromXML("Pokemons", "PokemonsGeneration1");
        _skillsDataList   = LoadDictListFromXML("Skills", "SkillsGeneration1");

        Skill skill1 = SkillGenerator.Create();
    }
 protected virtual void Start()
 {
     for (int i = 0; i < skills.Length; i++)
     {
         BaseSkill sk = SkillGenerator.Instance().GetSkill(skills[i]);
         sk.SetCaster(this);
         status.Skills.Add(sk);
     }
     InvokeRepeating("UpdateStatistic", 0, UPDATE_STATISTIC_INTERVAL);
     InvokeRepeating("CheckBuff", 0, BUFF_CHECK_INTERVAL);
     InvokeRepeating("RecoverConsumedAttribute", 0, CONSUMED_ATTRIBUTE_RECOVER_INTERVAL);
     InvokeRepeating("EargleEyeImgTransformRotation", 0, 0.05f);
 }
Esempio n. 4
0
    public Pokemon(int index)
    {
        Dictionary <string, string> dict = DataController.instance.pokemonsDataList[index - 1];

        _id    = IDController.id;
        _nameC = dict["nameC"];
        _nameE = dict["nameE"];

        _lv = 100;

        _charactor = Charactor.Hardy;

        _attr1 = (Attr)int.Parse(dict["attr1"]);
        _attr2 = (Attr)int.Parse(dict["attr2"]);

        attack      = CalcADSValue(dict, "attackRV");
        magicAttack = CalcADSValue(dict, "magicAttackRV");
        defend      = CalcADSValue(dict, "defendRV");
        magicDefend = CalcADSValue(dict, "magicDefendRV");
        speed       = CalcADSValue(dict, "speedRV");

        CharactorCalculator.instance.CharactorRevise(this);

        HP    = CalcHPValue(dict);
        curHP = HP;

        _attackBuff      = new Buff(BuffType.Attack, this);
        _magicAttackBuff = new Buff(BuffType.MagicAttack, this);
        _defendBuff      = new Buff(BuffType.Defend, this);
        _magicDefendBuff = new Buff(BuffType.MagicDefend, this);
        _speedBuff       = new Buff(BuffType.Speed, this);

        _skill1 = SkillGenerator.Create();
        _skill2 = SkillGenerator.Create();
        _skill3 = SkillGenerator.Create();
        _skill4 = SkillGenerator.Create();

        string[] skillIndex = dict["canLearnSkillsList"].Split(',');
        for (int i = 0; i < skillIndex.Length; i++)
        {
            canLearnSkillList.Add(int.Parse(skillIndex[i]));
        }

        _generation = dict["generation"];
    }
Esempio n. 5
0
    public static RoleInfo CreateRoleInfo(CommonDefine.RoleType roleType)
    {
        RoleInfo info     = new RoleInfo();
        RoleData roleData = RoleData.GetRoleDataByID((int)roleType);

        info.type   = roleType;
        info.style  = (CommonDefine.RoleStyle)roleData.style;
        info.Name   = roleData.name;
        info.Level  = 1;
        info.id     = Guid.NewGuid().GetHashCode();
        info.Skills = SkillGenerator.CreateDefaultSkills(roleType);
        int[] levels = ProjectHelper.InitSkillLevel(info.Skills);
        info.UpdateSkill1(levels[0]);
        info.UpdateSkill2(levels[1]);
        info.UpdateSkill3(levels[2]);
        info.UpdateSkill4(levels[3]);
        info.UpdateSkill5(levels[4]);
        info.UpdateSkill6(levels[5]);
        info.UpdateSkill7(levels[6]);

        return(info);
    }
 void Awake()
 {
     _skillGenerator = this;
 }
Esempio n. 7
0
 void Start()
 {
     SkillGenerator.instance = this;
 }
Esempio n. 8
0
 void Start()
 {
     gameManager    = GameObject.Find("GameManager");
     skillGenerator = gameManager.GetComponent <SkillGenerator>();
 }
Esempio n. 9
0
 public void Start()
 {
     scoreManager   = GameObject.Find("Generator").GetComponent <ScoreManager>();
     skillGenerator = GameObject.Find("Generator").GetComponent <SkillGenerator>();
 }