예제 #1
0
 public override void OnUpdate(OnUpdateProperties onUpdateProperties)
 {
     base.OnUpdate(onUpdateProperties);
     HandleRotation();
     HandleMovement();
     HandleOpenMenu();
 }
예제 #2
0
파일: MapBehavior.cs 프로젝트: cramt/deenee
        public override void OnUpdate(OnUpdateProperties onUpdateProperties)
        {
            base.OnUpdate(onUpdateProperties);

            if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.L))
            {
                ExtensionFilter objFilter   = new ExtensionFilter("3D files", "3D", "3DS", "3MF", "AC", "AC3D", "ACC", "AMF", "AMJ", "ASE", "ASK", "B3D", "BLEND", "BVH", "COB", "DAE", "DXF", "ENFF", "FBX", "IRR", "LWO", "LWS", "LXO", "MD2", "MD3", "MD5", "MDC", "MDL", "MESH", "MOT", "MS3D", "NDO", "NFF", "OBJ", "OFF", "OGEX", "PLY", "PMX", "PRJ", "Q3O", "Q3S", "RAW", "SCN", "SIB", "SMD", "STL", "TER", "UC", "VTA", "X", "X3D", "XGL", "ZGL");
                ExtensionFilter imageFilter = new ExtensionFilter("Image files", "png", "jpg", "jpeg");
                StandaloneFileBrowser.OpenFilePanelAsync("Load File", "", new ExtensionFilter[] { objFilter, imageFilter }, true, (string[] paths) => {
                    paths.ToList().ForEach(path => {
                        string name      = new FileInfo(path).Name;
                        string[] split   = name.Split('.');
                        string nameWOext = split[0];
                        string ext       = split[1];
                        if (objFilter.Extensions.Contains(ext.ToUpper()))
                        {
                            byte[] data = File.ReadAllBytes(path);
                            Main.campaign.AddObject(name, data);
                            //TODO: actually do this
                        }
                        else
                        {
                        }
                    });
                });
            }
        }
예제 #3
0
        void Update()
        {
            OnUpdateProperties props = new OnUpdateProperties {
                DeltaTime = Time.deltaTime,
            };

            // run all the functions asked to be run on main thread, and clear them from the list
            while (invokeFunctionList.Count != 0)
            {
                invokeFunctionList[0].Key();
                invokeFunctionList[0].Value.SetResult(props);
                invokeFunctionList.RemoveAt(0);
            }
            // run the OnUpdate
            OnUpdate(props);
        }
예제 #4
0
 /// <summary>
 /// overwrite this for a method that is runs each frame
 /// </summary>
 /// <param name="onUpdateProperties">properties for updating</param>
 public virtual void OnUpdate(OnUpdateProperties onUpdateProperties)
 {
 }
예제 #5
0
 public override void OnUpdate(OnUpdateProperties onUpdateProperties)
 {
     base.OnUpdate(onUpdateProperties);
 }
예제 #6
0
 public override void OnUpdate(OnUpdateProperties onUpdateProperties)
 {
     base.OnUpdate(onUpdateProperties);
     discord.RunCallbacks();
 }