Пример #1
0
 // Token: 0x06002B20 RID: 11040
 // RVA: 0x00117468 File Offset: 0x00115668
 internal Class703(string string_2, Vector2 vector2_1, Origins origins_1, StoryLayer storyLayer_1, int int_6, double double_1, bool bool_4, LoopTypes loopTypes_0)
 {
     this.vector2_0 = vector2_1;
     this.origins_0 = origins_1;
     this.int_3 = int_6;
     this.bool_3 = bool_4;
     this.double_0 = Math.Max(1.0, double_1);
     this.storyLayer_0 = storyLayer_1;
     this.float_0 = Class872.smethod_6(this.storyLayer_0);
     this.class538_0 = new Class538(null, Enum115.const_2, origins_1, Enum114.const_1, vector2_1, this.float_0, false, Color.get_White(), null);
     this.class538_0.loopTypes_0 = loopTypes_0;
     if (Class466.Current != null && Class466.Current.int_6 < 6)
     {
         this.class538_0.method_53(Math.Round(0.015 * double_1) * 1.186 * 16.666666666666668);
     }
     else
     {
         this.class538_0.method_53(double_1);
     }
     this.class531_0 = this.class538_0;
     this.eventTypes_0 = EventTypes.Animation;
     this.string_0 = string_2.Replace(Class466.Current.method_3() + Path.DirectorySeparatorChar, string.Empty);
     this.string_1 = new string[this.int_3];
     for (int i = 0; i < this.int_3; i++)
     {
         string text = this.string_0.Replace(".", i + ".");
         Class885.smethod_7(text);
         this.string_1[i] = text;
     }
     this.class538_0.method_41(new EventHandler(this.method_4));
 }
Пример #2
0
 internal LoopExpression(XzaarExpression body, LabelTarget @break, LabelTarget @continue, LoopTypes loopType)
 {
     this.body      = body;
     this.@break    = @break;
     this.@continue = @continue;
     this.loopType  = loopType;
 }
Пример #3
0
        public override void InitializeFromXml(XmlNode node)
        {
            XmlNode flipbook = Util.SelectSingleNode(node, "Flipbook");

            filename = flipbook.Attributes.GetNamedItem("Filename").Value;
            frames   = int.Parse(flipbook.Attributes.GetNamedItem("Frames").Value);
            switch (flipbook.Attributes.GetNamedItem("Loop").Value)
            {
            case "Loop":
                loopType = LoopTypes.Loop;
                break;

            case "UpDown":
                loopType = LoopTypes.UpDown;
                break;

            case "Down":
                loopType = LoopTypes.Down;
                break;

            case "UpDownOnce":
                loopType = LoopTypes.UpDownOnce;
                break;

            case "Once":
                loopType = LoopTypes.Once;
                break;

            case "Begin":
                loopType = LoopTypes.Begin;
                break;

            case "End":
                loopType = LoopTypes.End;
                break;

            default:
                break;
            }


            if (flipbook.Attributes.GetNamedItem("FramesX") != null)
            {
                FramesX = int.Parse(flipbook.Attributes.GetNamedItem("FramesX").Value);
            }
            if (flipbook.Attributes.GetNamedItem("FramesY") != null)
            {
                FramesY = int.Parse(flipbook.Attributes.GetNamedItem("FramesY").Value);
            }
            if (flipbook.Attributes.GetNamedItem("StartFrame") != null)
            {
                StartFrame = int.Parse(flipbook.Attributes.GetNamedItem("StartFrame").Value);
            }
            if (flipbook.Attributes.GetNamedItem("FrameSequence") != null)
            {
                FrameSequence = flipbook.Attributes.GetNamedItem("FrameSequence").Value;
            }
        }
Пример #4
0
        internal EventAnimation(string filename, Vector2 startPosition, Origins origin, StoryLayer layer, int frameCount, double frameDelay,
                                bool useSkinSprites, LoopTypes loopType)
        {
            this.startPosition  = startPosition;
            this.origin         = origin;
            this.FrameCount     = frameCount;
            this.useSkinSprites = useSkinSprites;

            FrameDelay = Math.Max(1, frameDelay);

            Layer = layer;

            depth = EventManager.GetIncreasingDrawDepth(Layer);

            Animation =
                new pAnimation(null, Fields.Storyboard, origin, Clocks.Audio, startPosition,
                               depth, false, Color.White, null);
            Animation.LoopType = loopType;
            if (BeatmapManager.Current != null && BeatmapManager.Current.BeatmapVersion < 6)
            {
                Animation.FrameDelay = Math.Round(0.015 * frameDelay) * 1.186 * GameBase.SIXTY_FRAME_TIME; //backwards compatibility for older storyboards.
            }
            else
            {
                Animation.FrameDelay = frameDelay;
            }

            Sprite = Animation;
            Type   = EventTypes.Animation;

            Filename = GeneralHelper.PathSanitise(filename).Replace(BeatmapManager.Current.ContainingFolderAbsolute + Path.DirectorySeparatorChar, string.Empty);

            Filenames = new string[FrameCount];
            for (int i = 0; i < FrameCount; i++)
            {
                string f = Filename.Replace(".", i + ".");
                TextureManager.Reference(f);
                Filenames[i] = f;
            }

            Animation.OnDisposable += Unload;
        }
Пример #5
0
        public static ILoopSettings CreateLoopSetting(LoopTypes loopType)
        {
            ILoopSettings loopSetting;

            switch (loopType)
            {
            case LoopTypes.None:
                loopSetting = new NoneLoop();
                break;

            case LoopTypes.Travelsal:
                loopSetting = new TravelsalLoop();
                break;

            case LoopTypes.CountPass:
                loopSetting = new CountPassLoop();
                break;

            default:
                loopSetting = new NoneLoop();
                break;
            }
            return(loopSetting);
        }
Пример #6
0
        public override void InitializeFromXml(System.Xml.XmlNode node)
        {
            XmlNode flipbook = node["Flipbook"];
            filename = flipbook.Attributes["Filename"].Value;
            frames = Convert.ToInt32(flipbook.Attributes["Frames"].Value);
            loopType = (LoopTypes)Enum.Parse(typeof(LoopTypes), flipbook.Attributes["Loop"].Value);

            if (flipbook.Attributes["FramesX"] != null)
            {
                FramesX = Convert.ToInt32(flipbook.Attributes["FramesX"].Value);
            }
            if (flipbook.Attributes["FramesY"] != null)
            {
                FramesY = Convert.ToInt32(flipbook.Attributes["FramesY"].Value);
            }
            if (flipbook.Attributes["StartFrame"] != null)
            {
                StartFrame = Convert.ToInt32(flipbook.Attributes["StartFrame"].Value);
            }
            if (flipbook.Attributes["FrameSequence"] != null)
            {
                FrameSequence = flipbook.Attributes["FrameSequence"].Value;
            }
        }
Пример #7
0
 private void flipbookStyle_SelectionChanged(object sender, EventArgs e)
 {
     LoopType = (LoopTypes)Enum.Parse(typeof(LoopTypes), flipbookStyle.SelectedItem.ToString());
 }
 private void flipbookStyle_SelectionChanged(object sender, EventArgs e)
 {
     LoopType = (LoopTypes)Enum.Parse(typeof(LoopTypes), flipbookStyle.SelectedItem.ToString());
 }
Пример #9
0
        public override void InitializeFromXml(XmlNode node)
        {
            XmlNode flipbook = Util.SelectSingleNode(node, "Flipbook");
            filename = flipbook.Attributes.GetNamedItem("Filename").Value;
            frames = int.Parse(flipbook.Attributes.GetNamedItem("Frames").Value);
            switch (flipbook.Attributes.GetNamedItem("Loop").Value)
            {

                case "Loop":
                    loopType = LoopTypes.Loop;
                    break;
                case "UpDown":
                    loopType = LoopTypes.UpDown;
                    break;
                case "Down":
                    loopType = LoopTypes.Down;
                    break;
                case "UpDownOnce":
                    loopType = LoopTypes.UpDownOnce;
                    break;
                case "Once":
                    loopType = LoopTypes.Once;
                    break;
                case "Begin":
                    loopType = LoopTypes.Begin;
                    break;
                case "End":
                    loopType = LoopTypes.End;
                    break;
                default:
                    break;
            }

            if (flipbook.Attributes.GetNamedItem("FramesX") != null)
            {
                FramesX = int.Parse(flipbook.Attributes.GetNamedItem("FramesX").Value);
            }
            if (flipbook.Attributes.GetNamedItem("FramesY") != null)
            {
                FramesY = int.Parse(flipbook.Attributes.GetNamedItem("FramesY").Value);
            }
            if (flipbook.Attributes.GetNamedItem("StartFrame") != null)
            {
                StartFrame = int.Parse(flipbook.Attributes.GetNamedItem("StartFrame").Value);
            }
            if (flipbook.Attributes.GetNamedItem("FrameSequence") != null)
            {
                FrameSequence = flipbook.Attributes.GetNamedItem("FrameSequence").Value;
            }
        }
Пример #10
0
 protected GameLoop(LoopTypes type)
 {
     LoopType            = type;
     renderTargetUsers3D = new List <IRenderTargetUser3D>();
 }