public Weapon(WeaponData weaponData, string fullName) : base(fullName) { if (weaponData == null) throw new Exception("WeaponData cannot be null"); Data = weaponData; TextureData = ResourceManager.GetTextureData(Data.TextureName); }
public static Weapon GetNewWeapon(string name) { if (name == null) { return(null); } WeaponData weaponData = GetWeaponData(name); if (weaponData == null) { return(null); } else { return(new Weapon(weaponData, name)); } }
public Trap(Sprite sprite, Vector2 position, Attributes attributes, WeaponData weaponData, PartyMember setter, Battle battle) : base(attributes) { if (attributes == null) throw new Exception("Attributes cannot be null"); if (setter == null) throw new Exception("PartyMember setter cannot be null"); if (battle == null) throw new Exception("Battle cannot be null"); this.setter = setter; this.battle = battle; Data = weaponData; entity = new Entity(sprite, position); entity.RenderShadow = true; entity.UpdateExtensions.Add(new UpdateExtension((updateExtension, delta) => Update(delta))); Scene.AddEntity(entity); }
public Trap(Sprite sprite, Vector2 position, Attributes attributes, WeaponData weaponData, PartyMember setter, Battle battle) : base(attributes) { if (attributes == null) { throw new Exception("Attributes cannot be null"); } if (setter == null) { throw new Exception("PartyMember setter cannot be null"); } if (battle == null) { throw new Exception("Battle cannot be null"); } this.setter = setter; this.battle = battle; Data = weaponData; entity = new Entity(sprite, position); entity.RenderShadow = true; entity.UpdateExtensions.Add(new UpdateExtension((updateExtension, delta) => Update(delta))); Scene.AddEntity(entity); }
public Attributes(WeaponData weaponData) { generateAttributes(true, weaponData.BlacklistedAttributesToList(), weaponData.ForceAttributes); }