protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Door", true, out subEle); Door.WriteXML(subEle, master); ele.TryPathTo("Position/X", true, out subEle); subEle.Value = PositionX.ToString("G15"); ele.TryPathTo("Position/Y", true, out subEle); subEle.Value = PositionY.ToString("G15"); ele.TryPathTo("Position/Z", true, out subEle); subEle.Value = PositionZ.ToString("G15"); ele.TryPathTo("Rotation/X", true, out subEle); subEle.Value = RotationX.ToString("G15"); ele.TryPathTo("Rotation/Y", true, out subEle); subEle.Value = RotationY.ToString("G15"); ele.TryPathTo("Rotation/Z", true, out subEle); subEle.Value = RotationZ.ToString("G15"); ele.TryPathTo("Alarm", true, out subEle); subEle.Value = Alarm.ToString(); }
public void WriteXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Position/X", true, out subEle); subEle.Value = PositionX.ToString("G15"); ele.TryPathTo("Position/Y", true, out subEle); subEle.Value = PositionY.ToString("G15"); ele.TryPathTo("Position/Z", true, out subEle); subEle.Value = PositionZ.ToString("G15"); ele.TryPathTo("Rotation/X", true, out subEle); subEle.Value = RotationX.ToString("G15"); ele.TryPathTo("Rotation/Y", true, out subEle); subEle.Value = RotationY.ToString("G15"); ele.TryPathTo("Rotation/Z", true, out subEle); subEle.Value = RotationZ.ToString("G15"); ele.TryPathTo("Scale", true, out subEle); subEle.Value = Scale.ToString("G15"); }
protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; ele.TryPathTo("Width", true, out subEle); subEle.Value = Width.ToString("G15"); ele.TryPathTo("Height", true, out subEle); subEle.Value = Height.ToString("G15"); ele.TryPathTo("Position/X", true, out subEle); subEle.Value = PositionX.ToString("G15"); ele.TryPathTo("Position/Y", true, out subEle); subEle.Value = PositionY.ToString("G15"); ele.TryPathTo("Position/Z", true, out subEle); subEle.Value = PositionZ.ToString("G15"); ele.TryPathTo("Rotation/Quaternion1", true, out subEle); subEle.Value = RotationQuaternion1.ToString("G15"); ele.TryPathTo("Rotation/Quaternion2", true, out subEle); subEle.Value = RotationQuaternion2.ToString("G15"); ele.TryPathTo("Rotation/Quaternion3", true, out subEle); subEle.Value = RotationQuaternion3.ToString("G15"); ele.TryPathTo("Rotation/Quaternion4", true, out subEle); subEle.Value = RotationQuaternion4.ToString("G15"); }
public DropItem(Screen screen, Resource resource, Vector2 position) { _screen = screen; _posZ = new PositionZ(MathExt.Random(7, 16), 0.4f, 2f); CreateBody(position); CreateItemSprite(resource.Code); CreateStartAction(); }
internal void Write(EndianBinaryWriter writer) { AnchorZ.Write(writer); PositionZ.Write(writer); DirectionX.Write(writer); DirectionY.Write(writer); DirectionZ.Write(writer); RotationX.Write(writer); RotationY.Write(writer); ScaleZ.Write(writer); }
internal void Read(EndianBinaryReader reader) { AnchorZ.Read(reader); PositionZ.Read(reader); DirectionX.Read(reader); DirectionY.Read(reader); DirectionZ.Read(reader); RotationX.Read(reader); RotationY.Read(reader); ScaleZ.Read(reader); }
internal List <Tuple <String, String> > GetAttributes() { var res = new List <Tuple <String, String> >(); res.Add(new Tuple <String, String>("position_x", PositionX.ToString(CultureInfo.InvariantCulture))); res.Add(new Tuple <String, String>("position_y", PositionY.ToString(CultureInfo.InvariantCulture))); res.Add(new Tuple <String, String>("position_z", PositionZ.ToString(CultureInfo.InvariantCulture))); res.Add(new Tuple <String, String>("orientation_x", OrientationX.ToString(CultureInfo.InvariantCulture))); res.Add(new Tuple <String, String>("orientation_y", OrientationY.ToString(CultureInfo.InvariantCulture))); res.Add(new Tuple <String, String>("orientation_z", OrientationZ.ToString(CultureInfo.InvariantCulture))); return(res); }
internal void Write(EndianBinaryWriter writer) { EyeX.Write(writer); EyeY.Write(writer); EyeZ.Write(writer); PositionX.Write(writer); PositionY.Write(writer); PositionZ.Write(writer); DirectionX.Write(writer); DirectionY.Write(writer); DirectionZ.Write(writer); RotationX.Write(writer); RotationY.Write(writer); RotationZ.Write(writer); Zoom.Write(writer); }
internal void Read(EndianBinaryReader reader) { EyeX.Read(reader); EyeY.Read(reader); EyeZ.Read(reader); PositionX.Read(reader); PositionY.Read(reader); PositionZ.Read(reader); DirectionX.Read(reader); DirectionY.Read(reader); DirectionZ.Read(reader); RotationX.Read(reader); RotationY.Read(reader); RotationZ.Read(reader); Zoom.Read(reader); }
public int CompareTo(StaticPlacement other) { int result = 0; if (result == 0 && PositionZ != null && other.PositionZ != null) { result = PositionZ.CompareTo(other.PositionZ); } if (result == 0 && PositionX != null && other.PositionX != null) { result = PositionX.CompareTo(other.PositionX); } if (result == 0 && PositionY != null && other.PositionY != null) { result = PositionY.CompareTo(other.PositionY); } if (result == 0 && RotationX != null && other.RotationX != null) { result = RotationX.CompareTo(other.RotationX); } if (result == 0 && RotationY != null && other.RotationY != null) { result = RotationY.CompareTo(other.RotationY); } if (result == 0 && RotationZ != null && other.RotationZ != null) { result = RotationZ.CompareTo(other.RotationZ); } if (result == 0 && Scale != null && other.Scale != null) { result = Scale.CompareTo(other.Scale); } return(result); }