Exemplo n.º 1
0
        public Monster(int id)
        {
            Entities entity = new Entities();
            GetsEffect = new Effect();

            #region Mapping
            BasicMonster basic = (from p in entity.BasicMonsters where p.Id == id select p).Single();
            Health = basic.Health;
            Armor = basic.Armor;
            Speed = (float)basic.Speed;
            Skill = basic.Skill;
            Model = basic.Model;
            Texture = basic.Texture;
            Money = basic.Money;
            Lvl = basic.Lvl;
            Name = basic.Name;
            Id = basic.Id;

            #endregion
        }
Exemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Effects EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEffects(Effect effect)
 {
     base.AddObject("Effects", effect);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new Effect object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="shockProbability">Initial value of the ShockProbability property.</param>
 /// <param name="shockTime">Initial value of the ShockTime property.</param>
 /// <param name="fireProbability">Initial value of the FireProbability property.</param>
 /// <param name="fireTime">Initial value of the FireTime property.</param>
 /// <param name="fireDamage">Initial value of the FireDamage property.</param>
 /// <param name="iceProbability">Initial value of the IceProbability property.</param>
 /// <param name="iceTime">Initial value of the IceTime property.</param>
 /// <param name="iceDamage">Initial value of the IceDamage property.</param>
 /// <param name="poisonProbability">Initial value of the PoisonProbability property.</param>
 /// <param name="poisonTime">Initial value of the PoisonTime property.</param>
 /// <param name="poisonDamage">Initial value of the PoisonDamage property.</param>
 public static Effect CreateEffect(global::System.Int32 id, global::System.Double shockProbability, global::System.Int32 shockTime, global::System.Double fireProbability, global::System.Int32 fireTime, global::System.Int32 fireDamage, global::System.Double iceProbability, global::System.Int32 iceTime, global::System.Int32 iceDamage, global::System.Double poisonProbability, global::System.Int32 poisonTime, global::System.Int32 poisonDamage)
 {
     Effect effect = new Effect();
     effect.Id = id;
     effect.ShockProbability = shockProbability;
     effect.ShockTime = shockTime;
     effect.FireProbability = fireProbability;
     effect.FireTime = fireTime;
     effect.FireDamage = fireDamage;
     effect.IceProbability = iceProbability;
     effect.IceTime = iceTime;
     effect.IceDamage = iceDamage;
     effect.PoisonProbability = poisonProbability;
     effect.PoisonTime = poisonTime;
     effect.PoisonDamage = poisonDamage;
     return effect;
 }