private static AttackPattern GetPattern(AttackPattern pattern, Vector3 initPos, Vector3 initRot) { Vector3[] pos = new Vector3[pattern.positions.Length + 1]; Vector3[] rot = new Vector3[pattern.rotations.Length + 1]; pos[0] = initPos; rot[0] = initRot; Array.Copy(pattern.positions, 0, pos, 1, pattern.positions.Length); Array.Copy(pattern.rotations, 0, rot, 1, pattern.positions.Length); return new AttackPattern(pos, rot); }
public Attack(NPC actor) : base(actor) { this.owner = actor; //pattern = AttackPattern.GetPattern(Mathf.FloorToInt(Random.value * 3f), owner.domhandpos, owner.weapon.target.localRotation.eulerAngles); pattern = AttackPattern.GetPattern(AttackPattern.TOP_DOWN, owner.domhandpos, owner.weapon.target.localRotation.eulerAngles); // Using this for now since others aren't done }