Example #1
0
        private static void CollectModels(string id, LoadBatch loader)
        {
            EntityData entityData = ModelFactory.GetEntityData(id);

            if (!string.IsNullOrEmpty(entityData.model))
            {
                loader.Add(new AssetsLoader("model/" + entityData.model));
            }

            int c1 = entityData.skills.Length;

            for (int i = 0; i < c1; i++)
            {
                SkillData skillData = ModelFactory.GetSkillData(entityData.skills[i]);

                PreloadBuffs(loader, skillData.passiveBuffs);
                PreloadBuffs(loader, skillData.buffs);

                if (skillData.levels == null)
                {
                    continue;
                }

                int c6 = skillData.levels.Length;
                for (int j = 0; j < c6; j++)
                {
                    SkillData.Level level = skillData.levels[j];

                    string     fx = level.atkFx;
                    EntityData effectData;
                    if (!string.IsNullOrEmpty(fx))
                    {
                        effectData = ModelFactory.GetEntityData(fx);
                        loader.Add(new AssetsLoader("model/" + effectData.model));
                    }

                    string missile = level.missile;
                    if (!string.IsNullOrEmpty(missile))
                    {
                        EntityData missileData = ModelFactory.GetEntityData(missile);
                        if (!string.IsNullOrEmpty(missileData.model))
                        {
                            loader.Add(new AssetsLoader("model/" + missileData.model));
                        }

                        if (!string.IsNullOrEmpty(missileData.hitFx))
                        {
                            effectData = ModelFactory.GetEntityData(missileData.hitFx);
                            loader.Add(new AssetsLoader("model/" + effectData.model));
                        }
                    }
                }
            }
        }
Example #2
0
 public void ApplyLevel(int level)
 {
     this.property.ApplyLevel(level);
     SkillData.Level lvlDef = this._data.levels[level];
     this.atkTime        = lvlDef.atkTime;
     this.sufTime        = lvlDef.sufTime;
     this.firingTime     = lvlDef.firingTime;
     this.action         = lvlDef.action;
     this.actionLength   = lvlDef.actionLength;
     this.dashStartSpeed = lvlDef.dashStartSpeed;
     this.dashSpeedCurve = lvlDef.dashSpeedCurve;
     this.distance       = lvlDef.distance;
     this.manaCost       = lvlDef.manaCost;
     this.cd             = lvlDef.cooldown;
     this.atkFx          = lvlDef.atkFx;
     this.atkFxTime      = lvlDef.atkFxTime;
     this.atkSound       = lvlDef.atkSound;
     this.missile        = lvlDef.missile;
 }