public override void Read(AssetReader reader) { base.Read(reader); if (IsReadMode(reader.Version)) { Mode = (ParticleSystemAnimationMode)reader.ReadInt32(); } FrameOverTime.Read(reader); if (IsReadStartFrame(reader.Version)) { StartFrame.Read(reader); } TilesX = reader.ReadInt32(); TilesY = reader.ReadInt32(); AnimationType = (ParticleSystemAnimationType)reader.ReadInt32(); RowIndex = reader.ReadInt32(); Cycles = reader.ReadSingle(); if (IsReadUvChannelMask(reader.Version)) { UvChannelMask = reader.ReadInt32(); } if (IsReadFlipU(reader.Version)) { FlipU = reader.ReadSingle(); FlipV = reader.ReadSingle(); } RandomRow = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); if (IsReadSprites(reader.Version)) { m_sprites = reader.ReadArray <SpriteData>(); } }
public MainWindow() { InitializeComponent(); _frame = StartFrame; StartFrame.Navigate(new PageAuth()); }
public override void Read(AssetStream stream) { base.Read(stream); if (IsReadMode(stream.Version)) { Mode = stream.ReadInt32(); } FrameOverTime.Read(stream); if (IsReadStartFrame(stream.Version)) { StartFrame.Read(stream); } TilesX = stream.ReadInt32(); TilesY = stream.ReadInt32(); AnimationType = stream.ReadInt32(); RowIndex = stream.ReadInt32(); Cycles = stream.ReadSingle(); if (IsReadUvChannelMask(stream.Version)) { UvChannelMask = stream.ReadInt32(); } if (IsReadFlipU(stream.Version)) { FlipU = stream.ReadSingle(); FlipV = stream.ReadSingle(); } RandomRow = stream.ReadBoolean(); stream.AlignStream(AlignType.Align4); if (IsReadSprites(stream.Version)) { m_sprites = stream.ReadArray <SpriteData>(); } }
protected override XmlElement VCreateInheritedElement(XmlElement baseElement) { var textureElement = baseElement.OwnerDocument.CreateElement("Texture"); textureElement.SetAttribute("resource", Texture); baseElement.AppendChild(textureElement); var animationElement = baseElement.OwnerDocument.CreateElement("Animation"); animationElement.SetAttribute("fx", FrameX.ToString(CultureInfo.InvariantCulture)); animationElement.SetAttribute("fy", FrameY.ToString(CultureInfo.InvariantCulture)); animationElement.SetAttribute("loop", Looping.ToString(CultureInfo.InvariantCulture)); if (Speed != null) { animationElement.SetAttribute("speed", Speed.ToString()); } if (StartFrame != null) { animationElement.SetAttribute("startFrame", StartFrame.ToString()); } if (EndFrame != null) { animationElement.SetAttribute("endFrame", EndFrame.ToString()); } if (m_SubAnimations.Count > 0) { animationElement.SetAttribute("defaultAnim", m_sDefaultAnim); } foreach (var subAnim in m_SubAnimations.Values) { var subAnimationNode = baseElement.OwnerDocument.CreateElement("SubAnimation"); subAnimationNode.SetAttribute("id", subAnim.ID); subAnimationNode.SetAttribute("speed", subAnim.Speed.ToString(CultureInfo.InvariantCulture)); subAnimationNode.SetAttribute("startFrame", subAnim.StartFrame.ToString(CultureInfo.InvariantCulture)); subAnimationNode.SetAttribute("endFrame", subAnim.EndFrame.ToString(CultureInfo.InvariantCulture)); animationElement.AppendChild(subAnimationNode); } baseElement.AppendChild(animationElement); var mirroredElement = baseElement.OwnerDocument.CreateElement("Mirrored"); mirroredElement.SetAttribute("status", Mirrored.ToString(CultureInfo.InvariantCulture)); baseElement.AppendChild(mirroredElement); var scriptElement = baseElement.OwnerDocument.CreateElement("OnEndScript"); scriptElement.SetAttribute("resource", OnEndScript); baseElement.AppendChild(scriptElement); return(baseElement); }
public Window() { InitializeComponent(); ProgressBarWindow progress = new ProgressBarWindow(); progress.ShowDialog(); StartPage startPage = StartPage.StartInstance; StartFrame.Navigate(startPage); }
public override YAMLNode ExportYAML(IAssetsExporter exporter) { YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(exporter); node.Add("mode", Mode); node.Add("frameOverTime", FrameOverTime.ExportYAML(exporter)); node.Add("startFrame", StartFrame.ExportYAML(exporter)); node.Add("tilesX", TilesX); node.Add("tilesY", TilesY); node.Add("animationType", AnimationType); node.Add("rowIndex", RowIndex); node.Add("cycles", Cycles); node.Add("uvChannelMask", UvChannelMask); node.Add("flipU", FlipU); node.Add("flipV", FlipV); node.Add("randomRow", RandomRow); node.Add("sprites", IsReadSprites(exporter.Version) ? Sprites.ExportYAML(exporter) : YAMLSequenceNode.Empty); return(node); }
public void Run() { IFrame frame = new StartFrame(); string message = null; do { frame.DisplayMenu(); frame.GetInput(); frame.ProcessInput(out message); frame = frame.Next(); if (message != null) { DisplayMessage(message); message = null; } } while (frame != null); }
public override string ToString() { var filterParameters = new StringBuilder(100); if (TransitionType != FadeTransitionType.In) { FilterUtility.ConcatenateParameter(filterParameters, "t", Formats.EnumValue(TransitionType)); } if (StartFrame.HasValue) { FilterUtility.ConcatenateParameter(filterParameters, "s", StartFrame.GetValueOrDefault()); } if (NumberOfFrames.HasValue) { FilterUtility.ConcatenateParameter(filterParameters, "n", NumberOfFrames.GetValueOrDefault()); } if (StartTime.HasValue) { FilterUtility.ConcatenateParameter(filterParameters, "st", StartTime.GetValueOrDefault()); } if (Duration.HasValue) { FilterUtility.ConcatenateParameter(filterParameters, "d", Duration.GetValueOrDefault()); } if (Alpha) { FilterUtility.ConcatenateParameter(filterParameters, "alpha", 1); } if (!string.IsNullOrWhiteSpace(Color)) { FilterUtility.ConcatenateParameter(filterParameters, "c", Color); } return(FilterUtility.JoinTypeAndParameters(this, filterParameters)); }
private void FlipbookSetup_Load(object sender, EventArgs e) { string[] values = Enum.GetNames(typeof(LoopTypes)); int index = 0; foreach (string value in values) { int temp = flipbookStyle.Items.Add(value); if (value == LoopType.ToString()) { index = temp; } } flipbookStyle.SelectedIndex = index; frameSequenceText.Text = FrameSequence; endFrame.Text = Frames.ToString(); startFrame.Text = StartFrame.ToString(); gridXText.Text = FramesX.ToString(); gridYText.Text = FramesY.ToString(); }
/// <inheritdoc/> public virtual int CompareTo(SegmentModelBase other) { // If other is not a valid object reference, this instance is greater. if (other == null) { return(1); } if (TrackNumber != other.TrackNumber) { return(TrackNumber.CompareTo(other.TrackNumber)); } // Same track if (other.StartFrame < StartFrame || other.StartFrame > EndFrame) { // Not overlapping return(StartFrame.CompareTo(other.StartFrame)); } // Equal or overlapping return(0); }
public override void Read(AssetReader reader) { base.Read(reader); if (IsReadMode(reader.Version)) { Mode = (ParticleSystemAnimationMode)reader.ReadInt32(); } if (IsReadTimeMode(reader.Version)) { TimeMode = (ParticleSystemAnimationTimeMode)reader.ReadInt32(); FPS = reader.ReadSingle(); } FrameOverTime.Read(reader); if (IsReadStartFrame(reader.Version)) { StartFrame.Read(reader); } if (IsReadSpeedRange(reader.Version)) { SpeedRange.Read(reader); } TilesX = reader.ReadInt32(); TilesY = reader.ReadInt32(); AnimationType = (ParticleSystemAnimationType)reader.ReadInt32(); RowIndex = reader.ReadInt32(); Cycles = reader.ReadSingle(); if (IsReadUvChannelMask(reader.Version)) { UvChannelMask = reader.ReadInt32(); } if (IsReadFlipU(reader.Version)) { if (IsReadFlipUFirst(reader.Version)) { FlipU = reader.ReadSingle(); FlipV = reader.ReadSingle(); } } if (IsReadRowMode(reader.Version)) { RowMode = (ParticleSystemAnimationRowMode)reader.ReadInt32(); } else { bool RandomRow = reader.ReadBoolean(); RowMode = RandomRow ? ParticleSystemAnimationRowMode.Random : ParticleSystemAnimationRowMode.Custom; reader.AlignStream(AlignType.Align4); } if (IsReadSprites(reader.Version)) { m_sprites = reader.ReadAssetArray <SpriteData>(); } if (IsReadFlipU(reader.Version)) { if (!IsReadFlipUFirst(reader.Version)) { FlipU = reader.ReadSingle(); FlipV = reader.ReadSingle(); } } }
protected virtual void OnStartFrame(AnimationFrame obj) { StartFrame?.Invoke(obj); }
public override string ToString() { return(StartFrame.ToString() + " " + EndFrame.ToString() + " " + " " + Fichier); }
public override string ToString() { return(FrameCount.ToString() + " " + this.Commentaire + " " + StartFrame.ToString() + " " + EndFrame.ToString() + " " + (EndFrame - StartFrame).ToString()); }