示例#1
0
        public virtual bool PEGI()
        {
            "Profile Name: ".edit(80, ref name);

#if UNITY_EDITOR
            string path = PainterCamera.Data.meshesFolderName + "/" + folderName;
            if (icon.Save.Click("Save To:" + path, 25).nl())
            {
                this.SaveToAssets(path, name);
                UnityHelperFunctions.RefreshAssetDatabase();
                (name + " Saved to " + path).showNotification();
            }


            UnityEngine.Object myType = null;
            if (pegi.edit(ref myType).nl())
            {
                var msol = (MeshPackagingProfile)(new MeshPackagingProfile().Decode(StuffLoader.LoadTextAsset(myType)));

                PainterCamera.Data.meshPackagingSolutions.Add(msol);
                PlaytimePainter.inspectedPainter.selectedMeshProfile = PainterCamera.Data.meshPackagingSolutions.Count - 1;
            }
#endif


            bool changed = false;
            for (int i = 0; i < sln.Count; i++)
            {
                changed |= sln[i].PEGI().nl();
            }

            return(changed);
        }
示例#2
0
        public Game()
        {
            Textures   = new StuffHolder <Texture>();
            Animations = new StuffHolder <List <Animation> >();
// ReSharper disable once UnusedVariable
            StuffLoader stuffLoader = new StuffLoader();

            _window.Closed += (sender, e) => ((Window)sender).Close();
            _machine.Run(StateMachine.BuildState <IntroState>(_machine, _window, true));
        }
示例#3
0
        public MenuState(StateMachine machine, RenderWindow window, bool replace = true) : base(machine, window, replace)
        {
            Console.WriteLine("menu created");

            EventMap[Actions.Enter] = new Action(Keyboard.Key.Return, ActionType.PressOnce);
            EventMap[Actions.Quit]  = new Action(Keyboard.Key.Escape, ActionType.ReleaseOnce) | new Action(EventType.Closed);

            EventSystem.Connect(Actions.Enter, c => Next           = StateMachine.BuildState <PlayState>(Machine, Window, true));
            EventSystem.Connect(Actions.Quit, c => Machine.Running = false);
            StuffLoader tLoader = new StuffLoader();
        }
示例#4
0
        public List <string> StrokeRecordingsFromFile(string filename)
        {
            string data;

            if (!recordings.TryGetValue(filename, out data))
            {
                data = StuffLoader.LoadFromPersistantPath(vectorsFolderName, filename);
                recordings.Add(filename, data);
            }

            var           cody    = new StdDecoder(data);
            List <string> strokes = new List <string>();

            foreach (var tag in cody)
            {
                var d = cody.GetData();
                switch (tag)
                {
                case "strokes": d.DecodeInto(out strokes); break;
                }
            }

            return(strokes);
        }