public UnitModel(string name, UnitCharacteristics characteristics, string weaponName, string unitName) { Name = name; Characteristics = characteristics; WeaponName = weaponName; UnitName = unitName; }
public static void CreateUnitCharAsset() { UnitCharacteristics newUnitChar = ScriptableObject.CreateInstance <UnitCharacteristics> (); AssetDatabase.CreateAsset(newUnitChar, "Assets/NewScriptableObject.asset"); AssetDatabase.SaveAssets(); EditorUtility.FocusProjectWindow(); Selection.activeObject = newUnitChar; }
public NonPlayableCharacter(string name, UnitCharacteristics characteristics, Weapon weapon, Unit unit) { Name = name; Characteristics = characteristics; Weapon = weapon; Unit = (Bot)unit; Unit.Characteristics = Characteristics; Unit.Character = this; //Unit.UpdateCharacteristics(); }
public BuildUnit( UnitCharacteristics characteristics, EntityController.Faction faction, EffectsController effectsController, BaseUnitController.UpdateCharacteristics updateCharacteristics, BaseUnitController.Death updateDeath, BaraksModel.SetUpdeteCharacteristicsDelegate setUpdeteCharacteristicsDelegate, Action deleteVisualEffect ) : base(characteristics, faction, effectsController, updateCharacteristics, updateDeath, setUpdeteCharacteristicsDelegate, deleteVisualEffect) { }
public BaseUnit( UnitCharacteristics characteristics, EntityController.Faction faction, EffectsController effectsController, BaseUnitController.UpdateCharacteristics updateCharacteristics, BaseUnitController.Death updateDeath, BaraksModel.SetUpdeteCharacteristicsDelegate setUpdeteCharacteristicsDelegate, Action deleteVisualEffect ) { this.deleteVisualEffect = deleteVisualEffect; this.setUpdeteCharacteristicsDelegate = setUpdeteCharacteristicsDelegate; setUpdeteCharacteristicsDelegate( UpdateBaseCharacteristics, false ); updateCharacteristicsDelegate = updateCharacteristics; this.updateDeath = updateDeath; baseCharacteristics = characteristics; currentHp = baseCharacteristics.hp; this.faction = faction; this.effectsController = effectsController; UpdateCharacteristics( baseCharacteristics ); }
public HeroUnit( string name, UnitCharacteristics characteristics, Spell[] spells, EntityController.Faction faction, EffectsController effectsController, BaseUnitController.UpdateCharacteristics updateCharacteristics, BaseUnitController.Death updateDeath, HeroUnitController.LevelUpEffectDelegate levelUpEffect, BaraksModel.SetUpdeteCharacteristicsDelegate setUpdeteCharacteristicsDelegate, Action deleteVisualEffect ) : base(characteristics, faction, effectsController, updateCharacteristics, updateDeath, setUpdeteCharacteristicsDelegate, deleteVisualEffect) { this.spells = spells; this.levelUpEffect = levelUpEffect; }
public void Start() { Character = new Character(); Character.Player = this; Character.Inventory = new Inventory(); Character.Inventory.Character = Character; Character.Parameters = new Parameters(); Characteristics = new UnitCharacteristics(150, 0, 0, 1, 0, 0, 6); Status = new Status(); Character.Inventory.InitializeEquipment(); Weapon weapon = Data.GetWeapon("Longsword"); //weapon.Props.HitEffects.Add(new WeaponModificator("extra damage", 10, WeaponModificators.ExtraDamage)); Character.Inventory.ChangeWeapon(weapon); /*Character.Inventory.ChangeArmor(Data.GetArmor("Platemail")); * Character.Inventory.ChangeArmor(Data.GetArmor("Plate leggins")); * Character.Inventory.ChangeArmor(Data.GetArmor("Sabatons")); * * Character.Inventory.Items.Add(Data.GetArmor("Boots")); * Character.Inventory.Items.Add(Data.GetWeapon("Halberd")); * Character.Inventory.Items.Add(Data.GetArmor("Stockings")); * Character.Inventory.Items.Add(Data.GetArmor("Rich shoes")); * Character.Inventory.Items.Add(Data.GetArmor("Simple pants")); * Character.Inventory.Items.Add(Data.GetArmor("Brigandine")); * Character.Inventory.Items.Add(Data.GetArmor("Armet"));*/ Character.Inventory.ChangeArmor(Data.GetArmor("Mercenary armor")); Character.Inventory.ChangeArmor(Data.GetArmor("Mercenary pants")); Character.Inventory.ChangeArmor(Data.GetArmor("Mercenary hat")); Character.Inventory.Items.Add(Data.GetArmor("Platemail")); Character.Inventory.Items.Add(Data.GetArmor("Plate leggins")); Character.Inventory.Items.Add(Data.GetArmor("Sabatons")); Character.Inventory.Items.Add(Data.GetArmor("Armet")); UpdateCharacteristics(); }
public static UnitCharacteristics operator +( UnitCharacteristics first, UnitCharacteristics second ) { UnitCharacteristics temp = new UnitCharacteristics(); temp.hp = first.hp + second.hp; temp.armor = first.armor + second.armor; temp.attackSpeed = first.attackSpeed + second.attackSpeed; temp.attackSpeed = first.attackSpeed + second.attackSpeed; temp.speed = first.speed + second.speed; temp.attackRange = first.attackRange + second.attackRange; return temp; }
protected void UpdateBaseCharacteristics( UnitCharacteristics characteristics ) { baseCharacteristics = characteristics; UpdateAppliedEffects(); }
public virtual void UpdateCharacteristics( UnitCharacteristics characteristics ) { currentCharacteristics = characteristics; updateCharacteristicsDelegate( currentCharacteristics, GetInfluence() ); }