public Fighter(FighterInfo info) { this.Info = info; // Generate Abilities from Ability factory using figher info Abilities = new List<Ability>(); foreach(int abilityId in this.Info.Abilities) { this.Abilities.Add(AbilityFactory.Factory.Abilities[abilityId]); } }
public FighterInfo Clone() { FighterInfo clone = new FighterInfo(); clone.Abilities = this.Abilities; clone.Attack = this.Attack; clone.Defence = this.Defence; clone.Experience = this.Experience; clone.Health = this.Health; clone.Position = this.Position; clone.Speed = this.Speed; clone.Name = this.Name; clone.mappedSkin = this.mappedSkin; return clone; }
public Ability Clone(FighterInfo info) { return new Ability(this.Effect); }
void Start() { if(reference != null) { FighterInfo = reference.Info; BaseStats = reference.fighter.Info; name = FighterInfo.Name; reference.OnActivateAbility += OnActivateAbility; reference.OnCompleteAbility += OnCompleteAbility; reference.OnDeath += OnDeath; reference.OnDamage += OnDamage; reference.OnDefend += OnDefend; Vector3 temp = transform.localPosition; stepBack = new Vector3(temp.x, temp.y, temp.z); stepForward = new Vector3(stepBack.x + 1, stepBack.y, stepBack.z); stepDead = new Vector3(temp.x - 2, temp.y, temp.z); stepBlock = new Vector3(temp.x -1, temp.y, temp.z); animator = GetComponent<Animator>(); GameControlScript control = GameControlScript.control; this.animator.runtimeAnimatorController = control.ACreferences.FromName(reference.Info.mappedSkin); } }