/*public List<int> attack_animation(AttackAnims anim) * { * AttackAnims base_key; * if (anim.Overlaps(AttackAnims.Attack)) * base_key = AttackAnims.Attack; * else if (anim.Overlaps(AttackAnims.Hold)) * base_key = AttackAnims.Hold; * else if (anim.Overlaps(AttackAnims.Return)) * base_key = AttackAnims.Return; * else * throw new ArgumentException(); * * * List<int> result; * if (anim.Overlaps(AttackAnims.Attack)) * { * if (anim.Overlaps(AttackAnims.Crit)) * { * if (try_attack_anim(base_key | AttackAnims.MissCrit, out result)) * return result; * else if (try_attack_anim(base_key | AttackAnims.NoDamageCrit, out result)) * return result; * else if (try_attack_anim(base_key | AttackAnims.HitCrit, out result)) * return result; * else * return AttackAnimations[base_key | AttackAnims.Hit]; * } * else * { * if (try_attack_anim(base_key | AttackAnims.Miss, out result)) * return result; * else if (try_attack_anim(base_key | AttackAnims.NoDamageHit, out result)) * return result; * else * return AttackAnimations[base_key | AttackAnims.Hit]; * } * } * * throw new ArgumentException(); * } * * private bool try_attack_anim(AttackAnims anim, out List<int> result) * { #if DEBUG * if (!AttackAnimations.ContainsKey(anim)) * throw new ArgumentException( * string.Format("Animation Data is missing a key for \"{0}\"", anim)); #endif * if (AttackAnimations[anim].Any()) * { * result = AttackAnimations[anim]; * return true; * } * result = null; * return false; * }*/ public bool compare(Battle_Animation_Association_Data other) { // Default animations if (!Idle.compare(other.Idle)) { return(false); } if (!Avoid.compare(other.Avoid)) { return(false); } if (!AvoidReturn.compare(other.AvoidReturn)) { return(false); } if (!GetHit.compare(other.GetHit)) { return(false); } if (!GetCrit.compare(other.GetCrit)) { return(false); } if (!PreFight.compare(other.PreFight)) { return(false); } if (!Dance.compare(other.Dance)) { return(false); } if (!DanceHold.compare(other.DanceHold)) { return(false); } if (!DanceReturn.compare(other.DanceReturn)) { return(false); } // Attack animations if (AttackAnimations.Count != other.AttackAnimations.Count) { return(false); } for (int i = 0; i < AttackAnimations.Count; i++) { if (!AttackAnimations[i].compare(other.AttackAnimations[i])) { return(false); } } return(true); }
public override void Read(BinaryReader input) { Idle.read(input); Avoid.read(input); AvoidReturn.read(input); GetHit.read(input); GetCrit.read(input); Dance.read(input); DanceHold.read(input); DanceReturn.read(input); PreFight.read(input); AttackAnimations.read(input); }
public override void Write(BinaryWriter output) { Idle.write(output); Avoid.write(output); AvoidReturn.write(output); GetHit.write(output); GetCrit.write(output); Dance.write(output); DanceHold.write(output); DanceReturn.write(output); PreFight.write(output); AttackAnimations.write(output); }