diff --git a/3DRadSpace/.vs/3DRadSpace/v16/.suo b/3DRadSpace/.vs/3DRadSpace/v16/.suo
index b7658ae7..7ae15c18 100644
Binary files a/3DRadSpace/.vs/3DRadSpace/v16/.suo and b/3DRadSpace/.vs/3DRadSpace/v16/.suo differ
diff --git a/3DRadSpace/3DRadSpace/CameraW.cs b/3DRadSpace/3DRadSpace/CameraW.cs
index 479c4803..47855a84 100644
--- a/3DRadSpace/3DRadSpace/CameraW.cs
+++ b/3DRadSpace/3DRadSpace/CameraW.cs
@@ -20,18 +20,18 @@ public CameraW(Camera c)
InitializeComponent();
textBox1.Text = c.Name;
checkBox1.Checked = c.Enabled;
- textBox2.Text = c.Position.X.ToString("0.0",Program.CultureInfo);
- textBox3.Text = c.Position.Y.ToString("0.0", Program.CultureInfo);
- textBox4.Text = c.Position.Z.ToString("0.0", Program.CultureInfo);
- textBox7.Text = c.Rotation.X.ToString("0.0", Program.CultureInfo);
- textBox6.Text = c.Rotation.Y.ToString("0.0", Program.CultureInfo);
- textBox5.Text = c.Rotation.Z.ToString("0.0", Program.CultureInfo);
- textBox10.Text = c.CameraRotation.X.ToString("0.0", Program.CultureInfo);
- textBox9.Text = c.CameraRotation.Y.ToString("0.0", Program.CultureInfo);
- textBox8.Text = c.CameraRotation.Z.ToString("0.0", Program.CultureInfo);
+ textBox2.Text = c.Position.X.ToString(Program.CultureInfo);
+ textBox3.Text = c.Position.Y.ToString( Program.CultureInfo);
+ textBox4.Text = c.Position.Z.ToString( Program.CultureInfo);
+ textBox7.Text = c.Rotation.X.ToString( Program.CultureInfo);
+ textBox6.Text = c.Rotation.Y.ToString( Program.CultureInfo);
+ textBox5.Text = c.Rotation.Z.ToString( Program.CultureInfo);
+ textBox10.Text = c.CameraRotation.X.ToString( Program.CultureInfo);
+ textBox9.Text = c.CameraRotation.Y.ToString( Program.CultureInfo);
+ textBox8.Text = c.CameraRotation.Z.ToString( Program.CultureInfo);
numericUpDown1.Value = (decimal)c.GetFOVDegrees();
- textBox11.Text = c.MinDrawDist.ToString("0.0", Program.CultureInfo);
- textBox12.Text = c.MaxDrawDist.ToString("0.0", Program.CultureInfo);
+ textBox11.Text = c.MinDrawDist.ToString( Program.CultureInfo);
+ textBox12.Text = c.MaxDrawDist.ToString( Program.CultureInfo);
Behiavour = c.Behiavours;
UpdateList();
}
diff --git a/3DRadSpace/3DRadSpace/Content/obj/Windows/Content/.mgstats b/3DRadSpace/3DRadSpace/Content/obj/Windows/Content/.mgstats
index 403b435d..78a14beb 100644
--- a/3DRadSpace/3DRadSpace/Content/obj/Windows/Content/.mgstats
+++ b/3DRadSpace/3DRadSpace/Content/obj/Windows/Content/.mgstats
@@ -6,6 +6,6 @@ Source File,Dest File,Processor Type,Content Type,Source File Size,Dest File Siz
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/EOL_Sphere.x","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/EOL_Sphere.xnb","ModelProcessor","ModelContent",77619,19836,0.6359997
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Font.spritefont","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Font.xnb","FontDescriptionProcessor","SpriteFontContent",2068,21524,0.1389985
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Shaders/SH_Skybox.fx","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Shaders/SH_Skybox.xnb","EffectProcessor","CompiledEffectContent",2325,2188,3.903923
-"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.dds","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb","TextureProcessor","Texture2DContent",2796344,2796345,2.889363
-"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.x","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb","ModelProcessor","ModelContent",594945,439265,2.588415
+"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.dds","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb","TextureProcessor","Texture2DContent",2796344,2796345,0.3195379
+"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.x","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb","ModelProcessor","ModelContent",594945,439265,0.8540004
"C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Sounds/sound.ogg","C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Sounds/sound.xnb","SoundEffectProcessor","SoundEffectContent",6625,36201,0.6680005
diff --git a/3DRadSpace/3DRadSpace/Content/obj/Windows/Content/Skinmeshes/terrain0100.mgcontent b/3DRadSpace/3DRadSpace/Content/obj/Windows/Content/Skinmeshes/terrain0100.mgcontent
index 37fc048b..8316eb69 100644
--- a/3DRadSpace/3DRadSpace/Content/obj/Windows/Content/Skinmeshes/terrain0100.mgcontent
+++ b/3DRadSpace/3DRadSpace/Content/obj/Windows/Content/Skinmeshes/terrain0100.mgcontent
@@ -3,7 +3,7 @@
C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/Skinmeshes/terrain0100.x
2011-09-09T11:04:28+03:00
C:/Users/Athanatos/Documents/GitHub/3D_Rad_Space/3DRadSpace/3DRadSpace/Content/bin/Windows/Content/Skinmeshes/terrain0100.xnb
- 2020-06-14T00:08:35.0627752+03:00
+ 2020-06-14T22:15:04.2458692+03:00
XImporter
2020-02-26T07:46:56+02:00
ModelProcessor
diff --git a/3DRadSpace/3DRadSpace/EditorEvents.cs b/3DRadSpace/3DRadSpace/EditorEvents.cs
index a4aed6e1..81101732 100644
--- a/3DRadSpace/3DRadSpace/EditorEvents.cs
+++ b/3DRadSpace/3DRadSpace/EditorEvents.cs
@@ -11,572 +11,568 @@
namespace _3DRadSpace
{
- partial class Editor : Microsoft.Xna.Framework.Game
- {
- public static GameSettings GraphcalSettings= new GameSettings();
+ partial class Editor : Microsoft.Xna.Framework.Game
+ {
+ public static GameSettings GraphcalSettings= new GameSettings();
- bool ProjectSaved = true;
- void newProject(object a,EventArgs e)
- {
- saveProject(null, null);
- ClearObjects();
- ProjectSaved = true;
- discordRichPresence.SetPresence("Editing project", "New Project");
- }
- void openProject(object a,EventArgs e)
- {
- OpenFileDialog openFile = new OpenFileDialog()
- {
- Title = "Open a 3DRadSpace project",
- Filter = "3DRadSpace Project (*.3drsp)|*.3drsp",
- InitialDirectory = @"Projects",
- RestoreDirectory = true,
- AutoUpgradeEnabled = false,
- Multiselect = false
- };
- DialogResult b = openFile.ShowDialog();
- if(b == DialogResult.OK)
- {
- ClearObjects();
- _3DRadSpaceDll.Game.GameObjects = Project.Open(openFile.FileName);
- if(_3DRadSpaceDll.Game.GameObjects == null)
- {
- MessageBox.Show("Opened file is not a valid 3DRadSpace project", "Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
- return;
- }
- LoadAllObjects();
- UpdateObjects();
- ProjectSaved = true;
- OpenedFile = openFile.FileName;
- discordRichPresence.SetPresence("Editing project", Path.GetFileName(OpenedFile));
- }
- openFile.Dispose();
- }
- void saveProject(object a,EventArgs e)
- {
- if (OpenedFile != null) Project.Save(OpenedFile);
- else saveProjectAs(a, e);
- ProjectSaved = true;
- }
- void saveProjectAs(object a,EventArgs e)
- {
- SaveFileDialog saveFile = new SaveFileDialog()
- {
- Filter = "3DRadSpace Project (*.3drsp)|*.3drsp",
- Title = "Save a 3DRadSpace project",
- InitialDirectory = @"Projects",
- RestoreDirectory = true,
- AutoUpgradeEnabled = false,
- OverwritePrompt = true,
- };
- if (saveFile.ShowDialog() == DialogResult.OK)
- {
- Project.Save(saveFile.FileName);
- OpenedFile = saveFile.FileName;
- discordRichPresence.SetPresence("Editing project", Path.GetFileName(OpenedFile));
- ProjectSaved = true;
- }
- saveFile.Dispose();
- }
- void playProject(object a,EventArgs e)
- {
- saveProject(null, null);
- ProcessStartInfo process = new ProcessStartInfo(@"3DRadSpace_Player.exe", "\""+OpenedFile+"\"");
- Process p = Process.Start(process);
- p.WaitForExit();
- }
- void exitEditor(object a,EventArgs e)
- {
- Application.Exit();
- }
- void compileProject(object a,EventArgs e)
- {
- ProjectCompiler compiler = new ProjectCompiler();
- compiler.ShowDialog();
- compiler.Dispose();
- }
- void addObject(object a,EventArgs e)
- {
- AddObject add = new AddObject();
- add.ShowDialog();
- if (add.Result != null)
- {
- _3DRadSpaceDll.Game.GameObjects.Add(add.Result);
- if(add.Result is Skinmesh s) s.Load(Content);
- if (add.Result is Sprite sp) sp.Load(Content,GraphicsDevice);
- if (add.Result is TextPrint tp) tp.Load(Content);
- if (add.Result is Skybox sb) sb.Load(Content, GraphicsDevice);
- ProjectSaved = false;
- }
- UpdateObjects();
- add.Dispose();
- }
- void addAddon(object a,EventArgs e)
- {
- OpenFileDialog openFile = new OpenFileDialog()
- {
- Title = "Add a 3DRadSpace project as a addon",
- InitialDirectory = @"Projects",
- RestoreDirectory = true,
- AutoUpgradeEnabled = false,
- Filter = "3DRadSpace Project (*.3drsp)|*.3drsp",
- Multiselect = false
- };
- DialogResult b = openFile.ShowDialog();
- if (b == DialogResult.OK)
- {
- List c = Project.Open(openFile.FileName);
- _3DRadSpaceDll.Game.GameObjects.AddRange(c);
- UpdateObjects();
- ProjectSaved = false;
- }
- openFile.Dispose();
- }
- void installResources(object a,EventArgs e)
- {
- ResourceWizard wizard = new ResourceWizard();
- wizard.ShowDialog();
- wizard.Dispose();
- }
- void checkforUpdatesEvent(object s,EventArgs a)
- {
- WebClient client = new WebClient();
- string v = client.DownloadString("https://drive.google.com/uc?export=download&id=0B9yRO5eZEvTjeHhPa05OZDRxUmM");
- bool NewVersionAvalable = false;
- for(int i =0; i < 3; i++)
- {
- if (Convert.ToInt32(v,Program.CultureInfo) != Program.Version)
- {
- NewVersionAvalable = true;
- toolStripStatusLabel1.Text = "Status: Downloading new update...";
- break;
- }
- }
- if(NewVersionAvalable)
- {
- DialogResult dialog = MessageBox.Show("New update found! Do you want it installed?", "Update", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
- if (dialog == DialogResult.Yes)
- {
- _updating = true;
- toolStripStatusLabel1.Text = "Status: Downloading new update...";
- client.DownloadProgressChanged += Client_DownloadProgressChanged;
- client.DownloadFileCompleted += Client_DownloadFileCompleted;
- client.DownloadFileAsync(new Uri("https://drive.google.com/uc?export=download&id=0B9yRO5eZEvTjSVhCZndjSGRUcVE"), @"Setup.exe");
- saveProject(null, null);
- client.Dispose();
- }
- else toolStripStatusLabel1.Text = "Status: Ready";
- }
- else
- {
- MessageBox.Show("No new update found!", "Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
- toolStripStatusLabel1.Text = "Status: Ready";
- }
- client.Dispose();
- }
+ bool ProjectSaved = true;
+ void newProject(object a,EventArgs e)
+ {
+ saveProject(null, null);
+ ClearObjects();
+ ProjectSaved = true;
+ discordRichPresence.SetPresence("Editing project", "New Project");
+ }
+ void openProject(object a,EventArgs e)
+ {
+ OpenFileDialog openFile = new OpenFileDialog()
+ {
+ Title = "Open a 3DRadSpace project",
+ Filter = "3DRadSpace Project (*.3drsp)|*.3drsp",
+ InitialDirectory = @"Projects",
+ RestoreDirectory = true,
+ AutoUpgradeEnabled = false,
+ Multiselect = false
+ };
+ DialogResult b = openFile.ShowDialog();
+ if(b == DialogResult.OK)
+ {
+ ClearObjects();
+ _3DRadSpaceDll.Game.GameObjects = Project.Open(openFile.FileName);
+ if(_3DRadSpaceDll.Game.GameObjects == null)
+ {
+ MessageBox.Show("Opened file is not a valid 3DRadSpace project", "Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
+ return;
+ }
+ LoadAllObjects();
+ UpdateObjects();
+ ProjectSaved = true;
+ OpenedFile = openFile.FileName;
+ discordRichPresence.SetPresence("Editing project", Path.GetFileName(OpenedFile));
+ }
+ openFile.Dispose();
+ }
+ void saveProject(object a,EventArgs e)
+ {
+ if (OpenedFile != null) Project.Save(OpenedFile);
+ else saveProjectAs(a, e);
+ ProjectSaved = true;
+ }
+ void saveProjectAs(object a,EventArgs e)
+ {
+ SaveFileDialog saveFile = new SaveFileDialog()
+ {
+ Filter = "3DRadSpace Project (*.3drsp)|*.3drsp",
+ Title = "Save a 3DRadSpace project",
+ InitialDirectory = @"Projects",
+ RestoreDirectory = true,
+ AutoUpgradeEnabled = false,
+ OverwritePrompt = true,
+ };
+ if (saveFile.ShowDialog() == DialogResult.OK)
+ {
+ Project.Save(saveFile.FileName);
+ OpenedFile = saveFile.FileName;
+ discordRichPresence.SetPresence("Editing project", Path.GetFileName(OpenedFile));
+ ProjectSaved = true;
+ }
+ saveFile.Dispose();
+ }
+ void playProject(object a,EventArgs e)
+ {
+ saveProject(null, null);
+ ProcessStartInfo process = new ProcessStartInfo(@"3DRadSpace_Player.exe", "\""+OpenedFile+"\"");
+ Process p = Process.Start(process);
+ p.WaitForExit();
+ }
+ void exitEditor(object a,EventArgs e)
+ {
+ Application.Exit();
+ }
+ void compileProject(object a,EventArgs e)
+ {
+ ProjectCompiler compiler = new ProjectCompiler();
+ compiler.ShowDialog();
+ compiler.Dispose();
+ }
+ void addObject(object a,EventArgs e)
+ {
+ AddObject add = new AddObject();
+ add.ShowDialog();
+ if (add.Result != null)
+ {
+ _3DRadSpaceDll.Game.GameObjects.Add(add.Result);
+ if(add.Result is Skinmesh s) s.Load(Content);
+ if (add.Result is Sprite sp) sp.Load(Content,GraphicsDevice);
+ if (add.Result is TextPrint tp) tp.Load(Content);
+ if (add.Result is Skybox sb) sb.Load(Content, GraphicsDevice);
+ ProjectSaved = false;
+ }
+ UpdateObjects();
+ add.Dispose();
+ }
+ void addAddon(object a,EventArgs e)
+ {
+ OpenFileDialog openFile = new OpenFileDialog()
+ {
+ Title = "Add a 3DRadSpace project as a addon",
+ InitialDirectory = @"Projects",
+ RestoreDirectory = true,
+ AutoUpgradeEnabled = false,
+ Filter = "3DRadSpace Project (*.3drsp)|*.3drsp",
+ Multiselect = false
+ };
+ DialogResult b = openFile.ShowDialog();
+ if (b == DialogResult.OK)
+ {
+ List c = Project.Open(openFile.FileName);
+ _3DRadSpaceDll.Game.GameObjects.AddRange(c);
+ UpdateObjects();
+ ProjectSaved = false;
+ }
+ openFile.Dispose();
+ }
+ void installResources(object a,EventArgs e)
+ {
+ ResourceWizard wizard = new ResourceWizard();
+ wizard.ShowDialog();
+ wizard.Dispose();
+ }
+ void checkforUpdatesEvent(object s,EventArgs a)
+ {
+ WebClient client = new WebClient();
+ string v = client.DownloadString("https://drive.google.com/uc?export=download&id=0B9yRO5eZEvTjeHhPa05OZDRxUmM");
+ bool NewVersionAvalable = false;
+ if (Convert.ToInt32(v,Program.CultureInfo) > Program.Version)
+ {
+ NewVersionAvalable = true;
+ toolStripStatusLabel1.Text = "Status: Downloading new update...";
+ }
+ if(NewVersionAvalable)
+ {
+ DialogResult dialog = MessageBox.Show("New update found! Do you want it installed?", "Update", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+ if (dialog == DialogResult.Yes)
+ {
+ _updating = true;
+ toolStripStatusLabel1.Text = "Status: Downloading new update...";
+ client.DownloadProgressChanged += Client_DownloadProgressChanged;
+ client.DownloadFileCompleted += Client_DownloadFileCompleted;
+ client.DownloadFileAsync(new Uri("https://drive.google.com/uc?export=download&id=0B9yRO5eZEvTjSVhCZndjSGRUcVE"), @"Setup.exe");
+ saveProject(null, null);
+ client.Dispose();
+ }
+ else toolStripStatusLabel1.Text = "Status: Ready";
+ }
+ else
+ {
+ MessageBox.Show("No new update found!", "Update", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ toolStripStatusLabel1.Text = "Status: Ready";
+ }
+ client.Dispose();
+ }
- private void Client_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
- {
- Process.Start(@"Setup.exe");
- Exit();
- }
+ private void Client_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
+ {
+ Process.Start(@"Setup.exe");
+ Exit();
+ }
- private void Client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
- {
- toolStripStatusLabel1.Text = "Status: Downloading new update "+e.ProgressPercentage+" % ("+(e.BytesReceived / 1024)+" KB recieved / "+(e.TotalBytesToReceive/1024)+" KB total)";
- }
+ private void Client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
+ {
+ toolStripStatusLabel1.Text = "Status: Downloading new update "+e.ProgressPercentage+" % ("+(e.BytesReceived / 1024)+" KB recieved / "+(e.TotalBytesToReceive/1024)+" KB total)";
+ }
- void aboutBoxOpen(object a, EventArgs e)
- {
- AboutBox aboutBox = new AboutBox();
- aboutBox.ShowDialog();
- aboutBox.Dispose();
- }
- void settingsOpen(object a, EventArgs e)
- {
- Settings settings = new Settings();
- settings.ShowDialog();
- settings.Dispose();
- Settings = Settings_Load();
- }
- void openDocumentation(object a,EventArgs b)
- {
- Process.Start("https://3dradspace.tk/Documentation");
- }
- void officialWebsite(object a, EventArgs b)
- {
- Process.Start("https://3dradspace.tk");
- }
- void openForum(object a, EventArgs b)
- {
- Process.Start("https://3dradspace.tk/Forum/index.php");
- }
- void reportBug(object a,EventArgs args)
- {
- Process.Start("https://3dradspace.tk/Forum/index.php?board=9.0");
- }
- void M_EditObject(object a, EventArgs e)
- {
- EditObj();
- UpdateObjects();
- }
- void EditObj()
- {
- object b = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index];
- if (b is Script)
- {
- ScriptW scriptW = new ScriptW((Script)_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index]);
- scriptW.ShowDialog();
- if (scriptW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = scriptW.Result;
- scriptW.Dispose();
- return;
- }
- if (b is FPVCamera fpv)
- {
- FPVCameraW wnd = new FPVCameraW(fpv);
- wnd.ShowDialog();
- if (wnd.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = wnd.Result;
- wnd.Dispose();
- return;
- }
- if (b is Camera)
- {
- CameraW cameraW = new CameraW((Camera)_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index]);
- cameraW.ShowDialog();
- if (cameraW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = cameraW.Result;
- cameraW.Dispose();
- return;
- }
- if (b is SkyColor)
- {
- SkyColorW colorW = new SkyColorW((SkyColor)_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index]);
- colorW.ShowDialog();
- if (colorW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = colorW.Result;
- colorW.Dispose();
- return;
- }
- if (b is Fog)
- {
- FogW fogW = new FogW((Fog)_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index]);
- fogW.ShowDialog();
- if (fogW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = fogW.Result;
- fogW.Dispose();
- return;
- }
- if (b is Skinmesh skn)
- {
- SkinmeshW skinmeshW = new SkinmeshW(skn);
- skinmeshW.ShowDialog();
- if (skinmeshW.Result != null)
- {
- _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = skinmeshW.Result;
- Skinmesh sk = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] as Skinmesh;
- sk.Load(Content);
- }
- skinmeshW.Dispose();
- return;
- }
- if (b is Sprite sp)
- {
- SpriteW spriteW = new SpriteW(sp);
- spriteW.ShowDialog();
- if (spriteW.Result != null)
- {
- _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = (Sprite)spriteW.Result;
- Sprite s = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] as Sprite;
- s.Load(Content, GraphicsDevice);
- }
- spriteW.Dispose();
- return;
- }
- if (b is TextPrint p)
- {
- TextPrintW textPrintW = new TextPrintW(p);
- textPrintW.ShowDialog();
- if (textPrintW.Result != null)
- {
- p = (TextPrint)textPrintW.Result;
- p.Load(Content);
- _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = p;
- }
- textPrintW.Dispose();
- return;
- }
- if (b is SoundEffect se)
- {
- SoundEffectW soundEffectW = new SoundEffectW(se);
- soundEffectW.ShowDialog();
- if (soundEffectW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = soundEffectW.Result;
- soundEffectW.Dispose();
- return;
- }
- if (b is SoundSource soundSource)
- {
- SoundSourceW soundSourceW = new SoundSourceW(soundSource);
- soundSourceW.ShowDialog();
- if (soundSourceW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = soundSourceW.Result;
- soundSourceW.Dispose();
- return;
- }
- if (b is EventOnLocation eol)
- {
- EventOnLocationW eolw = new EventOnLocationW(eol);
- eolw.ShowDialog();
- if (eolw.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = eolw.Result;
- eolw.Dispose();
- return;
- }
- if(b is EventOnKey eok)
- {
- EventOnKeyW eokw = new EventOnKeyW(eok);
- eokw.ShowDialog();
- if (eokw.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = eokw.Result;
- eokw.Dispose();
- return;
- }
- if(b is _3DRadSpaceDll.Timer t)
- {
- TimerW w = new TimerW(t);
- w.ShowDialog();
- if (w.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = w.Result;
- w.Dispose();
- return;
- }
- if(b is Skybox sb)
- {
- SkyBoxW skyboxW = new SkyBoxW(sb);
- skyboxW.ShowDialog();
- if (skyboxW.Result != null)
- {
- _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = (Skybox)skyboxW.Result;
- Skybox s = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] as Skybox;
- s.Load(Content, GraphicsDevice);
- }
- skyboxW.Dispose();
- return;
- }
- }
- void M_DeleteObject(object obj,EventArgs e)
- {
- if(_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] is SkyColor)
- {
- ClearColor = Color.Black;
- }
- if(_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] is Sprite sp)
- {
- sp.Dispose();
- }
- if (_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] is Skybox sb)
- {
- sb.Dispose();
- }
- if (_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] is TextPrint tp) tp.Dispose();
- _3DRadSpaceDll.Game.GameObjects.RemoveAt(listBox1.SelectedItems[0].Index);
- UpdateObjects();
- }
- void GameWindow_DragEnter(object sender, DragEventArgs e)
- {
- if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
- }
- void GameWindow_DragDrop(object sender, DragEventArgs e)
- {
- int l = _3DRadSpaceDll.Game.GameObjects.Count;
- string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
- for(int i =0; i < files.Length;i++)
- {
- string[] ext = files[i].Split('.');
- if(ext[ext.Length- 1] == "3drsp") _3DRadSpaceDll.Game.GameObjects.AddRange(Project.Open(files[i]));
- }
- ProjectSaved = false;
- LoadAllObjects(l);
- UpdateObjects();
- }
- void UpdateObjects()
- {
- listBox1.Items.Clear();
- for(int i =0; i < _3DRadSpaceDll.Game.GameObjects.Count;i++)
- {
- GameObject obj = _3DRadSpaceDll.Game.GameObjects[i];
- if(obj) listBox1.Items.Add(obj.Name);
- }
- }
- void listBox1_MouseDown(object sender,MouseEventArgs mouse)
- {
- if(mouse.Button == MouseButtons.Right && listBox1.SelectedItems.Count > 0)
- {
- contextMenuStrip1.Show(GameWindow.Location.X+listBox1.Location.X, Cursor.Position.Y);
- }
- }
- bool _updating = false;
- void Editor_Exiting(object sender, FormClosingEventArgs e)
- {
- if(Settings[1] == true && ProjectSaved == false && !_updating)
- {
- DialogResult result = MessageBox.Show("Your project is not saved. Unsaved changes can be lost.", "Warning", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
- if(result == DialogResult.Yes)
- {
- saveProject(sender, null);
- }
- else if(result == DialogResult.Cancel)
- {
- e.Cancel = true;
- }
- }
- }
- public static string ValidateNumberTextInput(string input)
- {
- if (input == null) return "0";
- string r = null;
- for(int i =0; i < input.Length;i++)
- {
- if (input[i] >= '0' && input[i] <= '9') r += input[i];
- if (input[i] == '.') r += input[i];
- if (input[i] == '-') r += input[i];
- }
- return r;
- }
- public static string ValidateTextInput(string input)
- {
- if (input == null) return "_object_";
- string r = null;
- for (int i = 0; i < input.Length; i++)
- {
- if (input[i] != ' ') r += input[i];
- else r += '_';
- }
- return r;
- }
- void ClearObjects()
- {
- ClearColor = Color.Black;
- for (int i =0; i < _3DRadSpaceDll.Game.GameObjects.Count;i++)
- {
- if(_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp)
- {
- sp.Dispose();
- }
- if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp)
- {
- tp.Dispose();
- }
- }
- _3DRadSpaceDll.Game.GameObjects.Clear();
- FogEnabled = false;
- UpdateObjects();
- }
- void LoadAllObjects()
- {
- for (int i = 0; i < _3DRadSpaceDll.Game.GameObjects.Count; i++)
- {
- if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c) c.Load(null);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Skinmesh sk) sk.Load(Content);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp) sp.Load(Content, GraphicsDevice);
- if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp) tp.Load(Content);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb) sb.Load(Content, GraphicsDevice);
- }
- }
- void LoadAllObjects(int offset)
- {
- for (int i = offset; i < _3DRadSpaceDll.Game.GameObjects.Count; i++)
- {
- if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c) c.Load(null);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Skinmesh sk) sk.Load(Content);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp) sp.Load(Content, GraphicsDevice);
- if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp) tp.Load(Content);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb) sb.Load(Content, GraphicsDevice);
- }
- }
- private void ListBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
- {
- e.Handled = true;
- }
+ void aboutBoxOpen(object a, EventArgs e)
+ {
+ AboutBox aboutBox = new AboutBox();
+ aboutBox.ShowDialog();
+ aboutBox.Dispose();
+ }
+ void settingsOpen(object a, EventArgs e)
+ {
+ Settings settings = new Settings();
+ settings.ShowDialog();
+ settings.Dispose();
+ Settings = Settings_Load();
+ }
+ void openDocumentation(object a,EventArgs b)
+ {
+ Process.Start("https://3dradspace.tk/Documentation");
+ }
+ void officialWebsite(object a, EventArgs b)
+ {
+ Process.Start("https://3dradspace.tk");
+ }
+ void openForum(object a, EventArgs b)
+ {
+ Process.Start("https://3dradspace.tk/Forum/index.php");
+ }
+ void reportBug(object a,EventArgs args)
+ {
+ Process.Start("https://3dradspace.tk/Forum/index.php?board=9.0");
+ }
+ void M_EditObject(object a, EventArgs e)
+ {
+ EditObj();
+ UpdateObjects();
+ }
+ void EditObj()
+ {
+ object b = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index];
+ if (b is Script)
+ {
+ ScriptW scriptW = new ScriptW((Script)_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index]);
+ scriptW.ShowDialog();
+ if (scriptW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = scriptW.Result;
+ scriptW.Dispose();
+ return;
+ }
+ if (b is FPVCamera fpv)
+ {
+ FPVCameraW wnd = new FPVCameraW(fpv);
+ wnd.ShowDialog();
+ if (wnd.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = wnd.Result;
+ wnd.Dispose();
+ return;
+ }
+ if (b is Camera)
+ {
+ CameraW cameraW = new CameraW((Camera)_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index]);
+ cameraW.ShowDialog();
+ if (cameraW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = cameraW.Result;
+ cameraW.Dispose();
+ return;
+ }
+ if (b is SkyColor)
+ {
+ SkyColorW colorW = new SkyColorW((SkyColor)_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index]);
+ colorW.ShowDialog();
+ if (colorW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = colorW.Result;
+ colorW.Dispose();
+ return;
+ }
+ if (b is Fog)
+ {
+ FogW fogW = new FogW((Fog)_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index]);
+ fogW.ShowDialog();
+ if (fogW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = fogW.Result;
+ fogW.Dispose();
+ return;
+ }
+ if (b is Skinmesh skn)
+ {
+ SkinmeshW skinmeshW = new SkinmeshW(skn);
+ skinmeshW.ShowDialog();
+ if (skinmeshW.Result != null)
+ {
+ _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = skinmeshW.Result;
+ Skinmesh sk = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] as Skinmesh;
+ sk.Load(Content);
+ }
+ skinmeshW.Dispose();
+ return;
+ }
+ if (b is Sprite sp)
+ {
+ SpriteW spriteW = new SpriteW(sp);
+ spriteW.ShowDialog();
+ if (spriteW.Result != null)
+ {
+ _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = (Sprite)spriteW.Result;
+ Sprite s = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] as Sprite;
+ s.Load(Content, GraphicsDevice);
+ }
+ spriteW.Dispose();
+ return;
+ }
+ if (b is TextPrint p)
+ {
+ TextPrintW textPrintW = new TextPrintW(p);
+ textPrintW.ShowDialog();
+ if (textPrintW.Result != null)
+ {
+ p = (TextPrint)textPrintW.Result;
+ p.Load(Content);
+ _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = p;
+ }
+ textPrintW.Dispose();
+ return;
+ }
+ if (b is SoundEffect se)
+ {
+ SoundEffectW soundEffectW = new SoundEffectW(se);
+ soundEffectW.ShowDialog();
+ if (soundEffectW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = soundEffectW.Result;
+ soundEffectW.Dispose();
+ return;
+ }
+ if (b is SoundSource soundSource)
+ {
+ SoundSourceW soundSourceW = new SoundSourceW(soundSource);
+ soundSourceW.ShowDialog();
+ if (soundSourceW.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = soundSourceW.Result;
+ soundSourceW.Dispose();
+ return;
+ }
+ if (b is EventOnLocation eol)
+ {
+ EventOnLocationW eolw = new EventOnLocationW(eol);
+ eolw.ShowDialog();
+ if (eolw.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = eolw.Result;
+ eolw.Dispose();
+ return;
+ }
+ if(b is EventOnKey eok)
+ {
+ EventOnKeyW eokw = new EventOnKeyW(eok);
+ eokw.ShowDialog();
+ if (eokw.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = eokw.Result;
+ eokw.Dispose();
+ return;
+ }
+ if(b is _3DRadSpaceDll.Timer t)
+ {
+ TimerW w = new TimerW(t);
+ w.ShowDialog();
+ if (w.Result != null) _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = w.Result;
+ w.Dispose();
+ return;
+ }
+ if(b is Skybox sb)
+ {
+ SkyBoxW skyboxW = new SkyBoxW(sb);
+ skyboxW.ShowDialog();
+ if (skyboxW.Result != null)
+ {
+ _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] = (Skybox)skyboxW.Result;
+ Skybox s = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] as Skybox;
+ s.Load(Content, GraphicsDevice);
+ }
+ skyboxW.Dispose();
+ return;
+ }
+ }
+ void M_DeleteObject(object obj,EventArgs e)
+ {
+ if(_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] is SkyColor)
+ {
+ ClearColor = Color.Black;
+ }
+ if(_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] is Sprite sp)
+ {
+ sp.Dispose();
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] is Skybox sb)
+ {
+ sb.Dispose();
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index] is TextPrint tp) tp.Dispose();
+ _3DRadSpaceDll.Game.GameObjects.RemoveAt(listBox1.SelectedItems[0].Index);
+ UpdateObjects();
+ }
+ void GameWindow_DragEnter(object sender, DragEventArgs e)
+ {
+ if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
+ }
+ void GameWindow_DragDrop(object sender, DragEventArgs e)
+ {
+ int l = _3DRadSpaceDll.Game.GameObjects.Count;
+ string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
+ for(int i =0; i < files.Length;i++)
+ {
+ string[] ext = files[i].Split('.');
+ if(ext[ext.Length- 1] == "3drsp") _3DRadSpaceDll.Game.GameObjects.AddRange(Project.Open(files[i]));
+ }
+ ProjectSaved = false;
+ LoadAllObjects(l);
+ UpdateObjects();
+ }
+ void UpdateObjects()
+ {
+ listBox1.Items.Clear();
+ for(int i =0; i < _3DRadSpaceDll.Game.GameObjects.Count;i++)
+ {
+ GameObject obj = _3DRadSpaceDll.Game.GameObjects[i];
+ if(obj) listBox1.Items.Add(obj.Name);
+ }
+ }
+ void listBox1_MouseDown(object sender,MouseEventArgs mouse)
+ {
+ if(mouse.Button == MouseButtons.Right && listBox1.SelectedItems.Count > 0)
+ {
+ contextMenuStrip1.Show(GameWindow.Location.X+listBox1.Location.X, Cursor.Position.Y);
+ }
+ }
+ bool _updating = false;
+ void Editor_Exiting(object sender, FormClosingEventArgs e)
+ {
+ if(Settings[1] == true && ProjectSaved == false && !_updating)
+ {
+ DialogResult result = MessageBox.Show("Your project is not saved. Unsaved changes can be lost.", "Warning", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
+ if(result == DialogResult.Yes)
+ {
+ saveProject(sender, null);
+ }
+ else if(result == DialogResult.Cancel)
+ {
+ e.Cancel = true;
+ }
+ }
+ }
+ public static string ValidateNumberTextInput(string input)
+ {
+ if (input == null) return "0";
+ string r = null;
+ for(int i =0; i < input.Length;i++)
+ {
+ if (input[i] >= '0' && input[i] <= '9') r += input[i];
+ if (input[i] == '.') r += input[i];
+ if (input[i] == '-') r += input[i];
+ }
+ return r;
+ }
+ public static string ValidateTextInput(string input)
+ {
+ if (input == null) return "_object_";
+ string r = null;
+ for (int i = 0; i < input.Length; i++)
+ {
+ if (input[i] != ' ') r += input[i];
+ else r += '_';
+ }
+ return r;
+ }
+ void ClearObjects()
+ {
+ ClearColor = Color.Black;
+ for (int i =0; i < _3DRadSpaceDll.Game.GameObjects.Count;i++)
+ {
+ if(_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp)
+ {
+ sp.Dispose();
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp)
+ {
+ tp.Dispose();
+ }
+ }
+ _3DRadSpaceDll.Game.GameObjects.Clear();
+ FogEnabled = false;
+ UpdateObjects();
+ }
+ void LoadAllObjects()
+ {
+ for (int i = 0; i < _3DRadSpaceDll.Game.GameObjects.Count; i++)
+ {
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c) c.Load(null);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Skinmesh sk) sk.Load(Content);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp) sp.Load(Content, GraphicsDevice);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp) tp.Load(Content);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb) sb.Load(Content, GraphicsDevice);
+ }
+ }
+ void LoadAllObjects(int offset)
+ {
+ for (int i = offset; i < _3DRadSpaceDll.Game.GameObjects.Count; i++)
+ {
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c) c.Load(null);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Skinmesh sk) sk.Load(Content);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp) sp.Load(Content, GraphicsDevice);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp) tp.Load(Content);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb) sb.Load(Content, GraphicsDevice);
+ }
+ }
+ private void ListBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
+ {
+ e.Handled = true;
+ }
- private void GameWindow_SizeChanged(object sender, EventArgs e)
- {
- listBox1.ClientSize = new System.Drawing.Size(listBox1.ClientSize.Width, GameWindow.ClientSize.Height - (int)(2.3*statusStrip1.Size.Height));
- }
- //int _oldindex = 0;
- private void ListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
- {
- if (_deselect) return;
+ private void GameWindow_SizeChanged(object sender, EventArgs e)
+ {
+ listBox1.ClientSize = new System.Drawing.Size(listBox1.ClientSize.Width, GameWindow.ClientSize.Height - (int)(2.3*statusStrip1.Size.Height));
+ }
+ //int _oldindex = 0;
+ private void ListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
+ {
+ if (_deselect) return;
- if (listBox1.SelectedItems.Count == 0)
- {
- if (listBox1.Items[e.Index].Checked != false) e.NewValue = CheckState.Unchecked;
- return;
- }
- GameObject o = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index];
- if (e.NewValue == CheckState.Unchecked)
- {
- if (o is EventOnLocation eol)
- {
- for (int i = 0; i < eol.Behiavours.Count; i++)
- {
- if (eol.SelectedObjects[i] == listBox1.SelectedItems[0].Index)
- {
- eol.Behiavours.RemoveAt(i);
- break;
- }
- }
- }
- if (o is EventOnKey eok)
- {
- for (int j = 0; j < eok.Behiavours.Count; j++)
- {
- if (eok.SelectedObjects[j] == listBox1.SelectedItems[0].Index)
- {
- eok.Behiavours.RemoveAt(j);
- break;
- }
- }
- }
- if (o is _3DRadSpaceDll.Timer t)
- {
- for (int i = 0; i < t.Behiavours.Count; i++)
- {
- if (t.SelectedObjects[i] == listBox1.SelectedItems[0].Index)
- {
- t.Behiavours.RemoveAt(i);
- break;
- }
- }
- }
- else
- {
- for (int i=0; i < o.Behiavours.Count; i++)
- {
- if (o.Behiavours[i].ObjectID == listBox1.SelectedItems[0].Index)
- {
- o.Behiavours.RemoveAt(i);
- break;
- }
- }
- }
- }
- else if (e.NewValue == CheckState.Checked)
- {
- if (o is EventOnLocation eol) eol.SelectedObjects.Add(e.Index );
- if (o is EventOnKey eok) eok.SelectedObjects.Add(e.Index);
- if (o is _3DRadSpaceDll.Timer t) t.SelectedObjects.Add(e.Index);
- else o.Behiavours.Add(new ObjectBehiavour(e.Index));
- }
- }
- bool _deselect;
- private void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- _deselect = true;
- for(int i =0; i < listBox1.Items.Count; i++)
- {
- listBox1.Items[i].Checked = false;
- }
- if (listBox1.SelectedItems.Count > 0 )
- {
- for (int i = 0; i < _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index].SelectedObjects.Count; i++)
- {
- listBox1.Items[_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index].SelectedObjects[i]].Checked = true;
- }
- }
- _deselect = false;
- }
- }
+ if (listBox1.SelectedItems.Count == 0)
+ {
+ if (listBox1.Items[e.Index].Checked != false) e.NewValue = CheckState.Unchecked;
+ return;
+ }
+ GameObject o = _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index];
+ if (e.NewValue == CheckState.Unchecked)
+ {
+ if (o is EventOnLocation eol)
+ {
+ for (int i = 0; i < eol.Behiavours.Count; i++)
+ {
+ if (eol.SelectedObjects[i] == listBox1.SelectedItems[0].Index)
+ {
+ eol.Behiavours.RemoveAt(i);
+ break;
+ }
+ }
+ }
+ if (o is EventOnKey eok)
+ {
+ for (int j = 0; j < eok.Behiavours.Count; j++)
+ {
+ if (eok.SelectedObjects[j] == listBox1.SelectedItems[0].Index)
+ {
+ eok.Behiavours.RemoveAt(j);
+ break;
+ }
+ }
+ }
+ if (o is _3DRadSpaceDll.Timer t)
+ {
+ for (int i = 0; i < t.Behiavours.Count; i++)
+ {
+ if (t.SelectedObjects[i] == listBox1.SelectedItems[0].Index)
+ {
+ t.Behiavours.RemoveAt(i);
+ break;
+ }
+ }
+ }
+ else
+ {
+ for (int i=0; i < o.Behiavours.Count; i++)
+ {
+ if (o.Behiavours[i].ObjectID == listBox1.SelectedItems[0].Index)
+ {
+ o.Behiavours.RemoveAt(i);
+ break;
+ }
+ }
+ }
+ }
+ else if (e.NewValue == CheckState.Checked)
+ {
+ if (o is EventOnLocation eol) eol.SelectedObjects.Add(e.Index );
+ if (o is EventOnKey eok) eok.SelectedObjects.Add(e.Index);
+ if (o is _3DRadSpaceDll.Timer t) t.SelectedObjects.Add(e.Index);
+ else o.Behiavours.Add(new ObjectBehiavour(e.Index));
+ }
+ }
+ bool _deselect;
+ private void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ _deselect = true;
+ for(int i =0; i < listBox1.Items.Count; i++)
+ {
+ listBox1.Items[i].Checked = false;
+ }
+ if (listBox1.SelectedItems.Count > 0 )
+ {
+ for (int i = 0; i < _3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index].SelectedObjects.Count; i++)
+ {
+ listBox1.Items[_3DRadSpaceDll.Game.GameObjects[listBox1.SelectedItems[0].Index].SelectedObjects[i]].Checked = true;
+ }
+ }
+ _deselect = false;
+ }
+ }
}
diff --git a/3DRadSpace/3DRadSpace/EventOnLocationW.cs b/3DRadSpace/3DRadSpace/EventOnLocationW.cs
index 2c71fa0e..e302694d 100644
--- a/3DRadSpace/3DRadSpace/EventOnLocationW.cs
+++ b/3DRadSpace/3DRadSpace/EventOnLocationW.cs
@@ -25,20 +25,20 @@ public EventOnLocationW(EventOnLocation eol)
textBox1.Text = eol.Name;
checkBox1.Checked = eol.Enabled;
checkBox2.Checked = eol.VisibleInEditor;
- textBox2.Text = eol.BoundingBox.Min.X.ToString("0.0",Program.CultureInfo);
- textBox3.Text = ""+eol.BoundingBox.Min.Y.ToString("0.0", Program.CultureInfo);
- textBox4.Text = ""+eol.BoundingBox.Min.Z.ToString("0.0", Program.CultureInfo);
- textBox5.Text = ""+eol.BoundingBox.Max.X.ToString("0.0", Program.CultureInfo);
- textBox6.Text = ""+eol.BoundingBox.Max.Y.ToString("0.0", Program.CultureInfo);
- textBox7.Text = ""+eol.BoundingBox.Max.Z.ToString("0.0", Program.CultureInfo);
- textBox8.Text = ""+eol.BoundingSphere.Center.X.ToString("0.0", Program.CultureInfo);
- textBox9.Text = ""+eol.BoundingSphere.Center.Y.ToString("0.0", Program.CultureInfo);
- textBox10.Text = ""+eol.BoundingSphere.Center.Z.ToString("0.0", Program.CultureInfo);
- textBox11.Text = ""+eol.BoundingSphere.Radius.ToString("0.0", Program.CultureInfo);
- textBox12.Text = ""+eol.BoundingPlane.Normal.X.ToString("0.0", Program.CultureInfo);
- textBox13.Text = ""+eol.BoundingPlane.Normal.Y.ToString("0.0", Program.CultureInfo);
- textBox14.Text = ""+eol.BoundingPlane.Normal.Z.ToString("0.0", Program.CultureInfo);
- textBox15.Text = ""+eol.BoundingPlane.D.ToString("0.0", Program.CultureInfo);
+ textBox2.Text = eol.BoundingBox.Min.X.ToString(Program.CultureInfo);
+ textBox3.Text = ""+eol.BoundingBox.Min.Y.ToString( Program.CultureInfo);
+ textBox4.Text = ""+eol.BoundingBox.Min.Z.ToString( Program.CultureInfo);
+ textBox5.Text = ""+eol.BoundingBox.Max.X.ToString( Program.CultureInfo);
+ textBox6.Text = ""+eol.BoundingBox.Max.Y.ToString( Program.CultureInfo);
+ textBox7.Text = ""+eol.BoundingBox.Max.Z.ToString( Program.CultureInfo);
+ textBox8.Text = ""+eol.BoundingSphere.Center.X.ToString( Program.CultureInfo);
+ textBox9.Text = ""+eol.BoundingSphere.Center.Y.ToString( Program.CultureInfo);
+ textBox10.Text = ""+eol.BoundingSphere.Center.Z.ToString( Program.CultureInfo);
+ textBox11.Text = ""+eol.BoundingSphere.Radius.ToString( Program.CultureInfo);
+ textBox12.Text = ""+eol.BoundingPlane.Normal.X.ToString( Program.CultureInfo);
+ textBox13.Text = ""+eol.BoundingPlane.Normal.Y.ToString( Program.CultureInfo);
+ textBox14.Text = ""+eol.BoundingPlane.Normal.Z.ToString( Program.CultureInfo);
+ textBox15.Text = ""+eol.BoundingPlane.D.ToString( Program.CultureInfo);
_eol = eol;
opcodes = eol.Behiavours;
}
diff --git a/3DRadSpace/3DRadSpace/ExitFadeW.cs b/3DRadSpace/3DRadSpace/ExitFadeW.cs
index c43a5bfd..6a7e7278 100644
--- a/3DRadSpace/3DRadSpace/ExitFadeW.cs
+++ b/3DRadSpace/3DRadSpace/ExitFadeW.cs
@@ -26,7 +26,7 @@ public ExitFadeW(ExitFade fade)
textBox2.Text = fade.Color.R + "";
textBox3.Text = fade.Color.G + "";
textBox4.Text = fade.Color.B + "";
- textBox5.Text = ""+(fade.Time * 1000f).ToString("0.0", Program.CultureInfo);
+ textBox5.Text = ""+(fade.Time * 1000f).ToString( Program.CultureInfo);
textBox6.Text = fade.Resource;
}
diff --git a/3DRadSpace/3DRadSpace/FPVCameraW .cs b/3DRadSpace/3DRadSpace/FPVCameraW .cs
index 39edffb7..0a57242c 100644
--- a/3DRadSpace/3DRadSpace/FPVCameraW .cs
+++ b/3DRadSpace/3DRadSpace/FPVCameraW .cs
@@ -20,23 +20,23 @@ public FPVCameraW(FPVCamera c)
InitializeComponent();
textBox1.Text = c.Name;
checkBox1.Checked = c.Enabled;
- textBox2.Text = c.Position.X.ToString("0.0",Program.CultureInfo);
- textBox3.Text = c.Position.Y.ToString("0.0", Program.CultureInfo);
- textBox4.Text = c.Position.Z.ToString("0.0", Program.CultureInfo);
- textBox7.Text = c.Rotation.X.ToString("0.0", Program.CultureInfo);
- textBox6.Text = c.Rotation.Y.ToString("0.0", Program.CultureInfo);
- textBox10.Text = c.CameraRotation.X.ToString("0.0", Program.CultureInfo);
- textBox9.Text = c.CameraRotation.Y.ToString("0.0", Program.CultureInfo);
- textBox8.Text = c.CameraRotation.Z.ToString("0.0", Program.CultureInfo);
+ textBox2.Text = c.Position.X.ToString(Program.CultureInfo);
+ textBox3.Text = c.Position.Y.ToString( Program.CultureInfo);
+ textBox4.Text = c.Position.Z.ToString( Program.CultureInfo);
+ textBox7.Text = c.Rotation.X.ToString( Program.CultureInfo);
+ textBox6.Text = c.Rotation.Y.ToString( Program.CultureInfo);
+ textBox10.Text = c.CameraRotation.X.ToString( Program.CultureInfo);
+ textBox9.Text = c.CameraRotation.Y.ToString( Program.CultureInfo);
+ textBox8.Text = c.CameraRotation.Z.ToString( Program.CultureInfo);
numericUpDown1.Value = (decimal)c.GetFOVDegrees();
- textBox11.Text = c.MinDrawDist.ToString("0.0", Program.CultureInfo);
- textBox12.Text = c.MaxDrawDist.ToString("0.0", Program.CultureInfo);
+ textBox11.Text = c.MinDrawDist.ToString( Program.CultureInfo);
+ textBox12.Text = c.MaxDrawDist.ToString( Program.CultureInfo);
comboBox1.SelectedItem = EventOnKeyW.GetKeyFromListBox_rev(c.Forward);
comboBox2.SelectedItem = EventOnKeyW.GetKeyFromListBox_rev(c.Backward);
comboBox3.SelectedItem = EventOnKeyW.GetKeyFromListBox_rev(c.Right);
comboBox4.SelectedItem = EventOnKeyW.GetKeyFromListBox_rev(c.Left);
- textBox5.Text = c.Sensibility.ToString("0.0", Program.CultureInfo);
- textBox13.Text = c.MovementSpeed.ToString("0.0", Program.CultureInfo);
+ textBox5.Text = c.Sensibility.ToString( Program.CultureInfo);
+ textBox13.Text = c.MovementSpeed.ToString( Program.CultureInfo);
}
public GameObject Result;
public List Behiavour;
diff --git a/3DRadSpace/3DRadSpace/FogW.cs b/3DRadSpace/3DRadSpace/FogW.cs
index cf1047bc..d7263c0a 100644
--- a/3DRadSpace/3DRadSpace/FogW.cs
+++ b/3DRadSpace/3DRadSpace/FogW.cs
@@ -22,11 +22,11 @@ public FogW(Fog fog)
InitializeComponent();
textBox1.Text = fog.Name;
checkBox1.Checked = fog.Enabled;
- textBox2.Text = fog.FogColor.X.ToString("0.0",Program.CultureInfo);
- textBox3.Text = fog.FogColor.Y.ToString("0.0", Program.CultureInfo);
- textBox4.Text = fog.FogColor.Z.ToString("0.0", Program.CultureInfo);
- textBox5.Text = fog.FogStart.ToString("0.0", Program.CultureInfo);
- textBox6.Text = fog.FogEnd.ToString("0.0", Program.CultureInfo);
+ textBox2.Text = fog.FogColor.X.ToString(Program.CultureInfo);
+ textBox3.Text = fog.FogColor.Y.ToString( Program.CultureInfo);
+ textBox4.Text = fog.FogColor.Z.ToString( Program.CultureInfo);
+ textBox5.Text = fog.FogStart.ToString( Program.CultureInfo);
+ textBox6.Text = fog.FogEnd.ToString( Program.CultureInfo);
}
public GameObject Result;
private void button1_Click(object sender, EventArgs e)
diff --git a/3DRadSpace/3DRadSpace/SkinmeshW.cs b/3DRadSpace/3DRadSpace/SkinmeshW.cs
index 40f44442..ede1c376 100644
--- a/3DRadSpace/3DRadSpace/SkinmeshW.cs
+++ b/3DRadSpace/3DRadSpace/SkinmeshW.cs
@@ -15,22 +15,22 @@ public SkinmeshW(Skinmesh sk)
textBox1.Text = sk.Name;
checkBox1.Checked = sk.Enabled;
textBox2.Text = sk.Resource;
- textBox3.Text = sk.Position.X.ToString("0.0",Program.CultureInfo);
- textBox4.Text = sk.Position.Y.ToString("0.0", Program.CultureInfo);
- textBox5.Text = sk.Position.Z.ToString("0.0", Program.CultureInfo);
- textBox8.Text = sk.Rotation.X.ToString("0.0", Program.CultureInfo);
- textBox7.Text = sk.Rotation.Y.ToString("0.0", Program.CultureInfo);
- textBox6.Text = sk.Rotation.Z.ToString("0.0", Program.CultureInfo);
- textBox11.Text = sk.Scale.X.ToString("0.0", Program.CultureInfo);
- textBox10.Text = sk.Scale.Y.ToString("0.0", Program.CultureInfo);
- textBox9.Text = sk.Scale.Z.ToString("0.0", Program.CultureInfo);
- textBox12.Text = sk.BoundingSphere.Radius.ToString("0.0", Program.CultureInfo);
- textBox13.Text = sk.BoundingBox.Min.X.ToString("0.0", Program.CultureInfo);
- textBox14.Text = sk.BoundingBox.Min.Y.ToString("0.0", Program.CultureInfo);
- textBox15.Text = sk.BoundingBox.Min.Z.ToString("0.0", Program.CultureInfo);
- textBox18.Text = sk.BoundingBox.Max.X.ToString("0.0", Program.CultureInfo);
- textBox17.Text = sk.BoundingBox.Max.Y.ToString("0.0", Program.CultureInfo);
- textBox16.Text = sk.BoundingBox.Max.Z.ToString("0.0", Program.CultureInfo);
+ textBox3.Text = sk.Position.X.ToString(Program.CultureInfo);
+ textBox4.Text = sk.Position.Y.ToString( Program.CultureInfo);
+ textBox5.Text = sk.Position.Z.ToString( Program.CultureInfo);
+ textBox8.Text = sk.Rotation.X.ToString( Program.CultureInfo);
+ textBox7.Text = sk.Rotation.Y.ToString( Program.CultureInfo);
+ textBox6.Text = sk.Rotation.Z.ToString( Program.CultureInfo);
+ textBox11.Text = sk.Scale.X.ToString( Program.CultureInfo);
+ textBox10.Text = sk.Scale.Y.ToString( Program.CultureInfo);
+ textBox9.Text = sk.Scale.Z.ToString( Program.CultureInfo);
+ textBox12.Text = sk.BoundingSphere.Radius.ToString( Program.CultureInfo);
+ textBox13.Text = sk.BoundingBox.Min.X.ToString( Program.CultureInfo);
+ textBox14.Text = sk.BoundingBox.Min.Y.ToString( Program.CultureInfo);
+ textBox15.Text = sk.BoundingBox.Min.Z.ToString( Program.CultureInfo);
+ textBox18.Text = sk.BoundingBox.Max.X.ToString( Program.CultureInfo);
+ textBox17.Text = sk.BoundingBox.Max.Y.ToString( Program.CultureInfo);
+ textBox16.Text = sk.BoundingBox.Max.Z.ToString( Program.CultureInfo);
}
public SkinmeshW()
{
diff --git a/3DRadSpace/3DRadSpace/SkyBoxW.cs b/3DRadSpace/3DRadSpace/SkyBoxW.cs
index bfe6e87c..132a99c3 100644
--- a/3DRadSpace/3DRadSpace/SkyBoxW.cs
+++ b/3DRadSpace/3DRadSpace/SkyBoxW.cs
@@ -23,7 +23,13 @@ public SkyBoxW(Skybox sb)
InitializeComponent();
textBox1.Text = sb.Name;
checkBox1.Checked = sb.Enabled;
- pictureBox1.ImageLocation = sb.Resource;
+ _loaded_sky = sb.Resource;
+ string[] textures = File.ReadAllLines(_loaded_sky);
+ for (int i = 0; i < 6; i++)
+ {
+ _imageslist[i] = Path.GetDirectoryName(_loaded_sky) + "\\" + textures[i];
+ }
+ pictureBox1.ImageLocation = _imageslist[0];
}
public GameObject Result;
private void button1_Click(object sender, EventArgs e)
diff --git a/3DRadSpace/3DRadSpace/SoundSourceW.cs b/3DRadSpace/3DRadSpace/SoundSourceW.cs
index a9bdcb06..a5388771 100644
--- a/3DRadSpace/3DRadSpace/SoundSourceW.cs
+++ b/3DRadSpace/3DRadSpace/SoundSourceW.cs
@@ -50,10 +50,10 @@ public SoundSourceW(SoundSource sound)
}
default: break;
}
- textBox3.Text = ""+sound.Position.X.ToString("0.0", Program.CultureInfo);
- textBox4.Text = ""+sound.Position.Y.ToString("0.0", Program.CultureInfo);
- textBox5.Text = ""+sound.Position.Z.ToString("0.0", Program.CultureInfo);
- textBox6.Text = ""+sound.DopplerScale.ToString("0.0", Program.CultureInfo);
+ textBox3.Text = ""+sound.Position.X.ToString( Program.CultureInfo);
+ textBox4.Text = ""+sound.Position.Y.ToString( Program.CultureInfo);
+ textBox5.Text = ""+sound.Position.Z.ToString( Program.CultureInfo);
+ textBox6.Text = ""+sound.DopplerScale.ToString( Program.CultureInfo);
}
diff --git a/3DRadSpace/3DRadSpace/SpriteW.cs b/3DRadSpace/3DRadSpace/SpriteW.cs
index 9a17eaf6..bdb7137c 100644
--- a/3DRadSpace/3DRadSpace/SpriteW.cs
+++ b/3DRadSpace/3DRadSpace/SpriteW.cs
@@ -19,17 +19,17 @@ public SpriteW(Sprite sp)
checkBox1.Checked = sp.Enabled;
textBox2.Text = sp.Resource;
pictureBox1.ImageLocation = sp.Resource;
- textBox3.Text = sp.Position.X.ToString("0.0", Program.CultureInfo);
- textBox4.Text = sp.Position.Y.ToString("0.0", Program.CultureInfo);
- textBox5.Text = sp.Rotation.ToString("0.0", Program.CultureInfo);
- textBox6.Text = sp.Size.X.ToString("0.0", Program.CultureInfo);
- textBox7.Text = sp.Size.Y.ToString("0.0", Program.CultureInfo);
+ textBox3.Text = sp.Position.X.ToString( Program.CultureInfo);
+ textBox4.Text = sp.Position.Y.ToString( Program.CultureInfo);
+ textBox5.Text = sp.Rotation.ToString( Program.CultureInfo);
+ textBox6.Text = sp.Size.X.ToString( Program.CultureInfo);
+ textBox7.Text = sp.Size.Y.ToString( Program.CultureInfo);
if (sp.SpriteSheetSection.HasValue)
{
- textBox8.Text = sp.SpriteSheetSection.Value.X.ToString("0.0", Program.CultureInfo);
- textBox9.Text = sp.SpriteSheetSection.Value.Y.ToString("0.0", Program.CultureInfo);
- textBox10.Text = sp.SpriteSheetSection.Value.Width.ToString("0.0", Program.CultureInfo);
- textBox11.Text = sp.SpriteSheetSection.Value.Height.ToString("0.0", Program.CultureInfo);
+ textBox8.Text = sp.SpriteSheetSection.Value.X.ToString( Program.CultureInfo);
+ textBox9.Text = sp.SpriteSheetSection.Value.Y.ToString( Program.CultureInfo);
+ textBox10.Text = sp.SpriteSheetSection.Value.Width.ToString( Program.CultureInfo);
+ textBox11.Text = sp.SpriteSheetSection.Value.Height.ToString( Program.CultureInfo);
}
else
{
@@ -38,9 +38,9 @@ public SpriteW(Sprite sp)
textBox10.Text = "0";
textBox11.Text = "0";
}
- textBox12.Text = ""+sp.Layer.ToString("0.0", Program.CultureInfo);
- textBox13.Text = ""+sp.Center.X.ToString("0.0", Program.CultureInfo);
- textBox14.Text = ""+sp.Center.Y.ToString("0.0", Program.CultureInfo);
+ textBox12.Text = ""+sp.Layer.ToString( Program.CultureInfo);
+ textBox13.Text = ""+sp.Center.X.ToString( Program.CultureInfo);
+ textBox14.Text = ""+sp.Center.Y.ToString( Program.CultureInfo);
textBox15.Text = sp.Mask.R + "";
textBox16.Text = sp.Mask.G + "";
textBox17.Text = sp.Mask.B + "";
diff --git a/3DRadSpace/3DRadSpace/TextPrintW.cs b/3DRadSpace/3DRadSpace/TextPrintW.cs
index ec5db4eb..23c428eb 100644
--- a/3DRadSpace/3DRadSpace/TextPrintW.cs
+++ b/3DRadSpace/3DRadSpace/TextPrintW.cs
@@ -24,11 +24,11 @@ public TextPrintW(TextPrint textPrint)
textBox1.Text = textPrint.Name;
checkBox1.Checked = textPrint.Enabled;
textBox2.Text = textPrint.Resource;
- textBox3.Text = textPrint.Position.X.ToString("0.0", CultureInfo.InvariantCulture);
- textBox4.Text = textPrint.Position.Y.ToString("0.0", CultureInfo.InvariantCulture);
- textBox5.Text = textPrint.Rotation.ToString("0.0", CultureInfo.InvariantCulture);
- textBox6.Text = textPrint.Center.X.ToString("0.0", CultureInfo.InvariantCulture);
- textBox7.Text = textPrint.Center.Y.ToString("0.0", CultureInfo.InvariantCulture);
+ textBox3.Text = textPrint.Position.X.ToString( CultureInfo.InvariantCulture);
+ textBox4.Text = textPrint.Position.Y.ToString( CultureInfo.InvariantCulture);
+ textBox5.Text = textPrint.Rotation.ToString( CultureInfo.InvariantCulture);
+ textBox6.Text = textPrint.Center.X.ToString( CultureInfo.InvariantCulture);
+ textBox7.Text = textPrint.Center.Y.ToString( CultureInfo.InvariantCulture);
textBox8.Text = textPrint.Text;
textBox9.Text = textPrint.Color.R.ToString(CultureInfo.InvariantCulture);
textBox10.Text = textPrint.Color.G.ToString(CultureInfo.InvariantCulture);
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace.exe b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace.exe
index 43a10746..7b1bbdd9 100644
Binary files a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace.exe and b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace.exe differ
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace.pdb b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace.pdb
index daebf883..5d962384 100644
Binary files a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace.pdb and b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace.pdb differ
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.dll b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.dll
index ef7e32ff..fbde359c 100644
Binary files a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.dll and b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.dll differ
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.pdb b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.pdb
index c8142640..deb548bd 100644
Binary files a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.pdb and b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.pdb differ
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.xml b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.xml
index 7fc08a6b..06ce403f 100644
--- a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.xml
+++ b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpaceDll.xml
@@ -659,6 +659,13 @@
+
+
+
+
+
+
+
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace_Player.exe b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace_Player.exe
index 81e3ad10..0fb4710f 100644
Binary files a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace_Player.exe and b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/3DRadSpace_Player.exe differ
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/EventOnKey and SoundEffect test.3drsp b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/EventOnKey and SoundEffect test.3drsp
index 033804a2..257ecb9c 100644
--- a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/EventOnKey and SoundEffect test.3drsp
+++ b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/EventOnKey and SoundEffect test.3drsp
@@ -1,5 +1,5 @@
3DRSP_text
skycolor SkyColor True 0 128 255
soundeffect SoundEffect True 1 0 0 0 Sounds/sound
-textprint TextPrint True 400 400 1 1 0 0 0 255 255 255 0 0 Press to play the sound þ Arial_12px
+textprint TextPrint True 400 400 1 1 0 0 0 255 255 255 0 0 Press to play the sound þ Arial_12px
eok EventOnKey True 13 1 0 1 1
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/FPVCamera test.3drsp b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/FPVCamera test.3drsp
new file mode 100644
index 00000000..e830105b
--- /dev/null
+++ b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/FPVCamera test.3drsp
@@ -0,0 +1,4 @@
+3DRSP_text
+skybox Skybox True Content\Skybox\TestSkybox\skybox.sky
+fpvcam FPVCamera True 0 7 0 0 0 1 1 0 75 0.1 500 38 37 40 39 1 0.0010
+skinmesh Skinmesh True 0 0 0 0 0 0 1 1 1 True -1 -1 -1 1 1 1 2 Skinmeshes/Terrain0100
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/Scripted FPVCamera.3drsp b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/Scripted FPVCamera.3drsp
index cdcf678d..334657e7 100644
--- a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/Scripted FPVCamera.3drsp
+++ b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Projects/Scripted FPVCamera.3drsp
@@ -2,5 +2,5 @@
camera Camera True 0 8 0 0 0 0 0 1 0 75 0.1 500 0
script Script True Script Scripts//Scripted FPVCamera.cs
textprint TextPrint True 400 400 1 1 0 0 0 255 255 255 0 0 Sample text þ Arial_12px
-skybox Skybox True Skybox\TestSkybox\skybox.sky
+skybox Skybox True Content\Skybox\TestSkybox\skybox.sky
skinmesh Skinmesh True 0 0 0 0 0 0 1 1 1 True -1 -1 -1 1 1 1 2 Skinmeshes\Terrain0100
diff --git a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Scripts/Simple Movment Script.cs b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Scripts/Simple Movment Script.cs
index 119395de..27ff9f2e 100644
--- a/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Scripts/Simple Movment Script.cs
+++ b/3DRadSpace/3DRadSpace/bin/Windows/x86/Debug/Scripts/Simple Movment Script.cs
@@ -18,8 +18,8 @@ public void Run(MouseState mouse, KeyboardState keyboard, GameTime time)
{
if(keyboard.IsKeyDown(Keys.Up)) _ourCamera.Position.Z += 1;
if(keyboard.IsKeyDown(Keys.Down)) _ourCamera.Position.Z -= 1;
- if(keyboard.IsKeyDown(Keys.Right)) _ourCamera.Position.X += 1;
- if(keyboard.IsKeyDown(Keys.Left)) _ourCamera.Position.X -= 1;
+ if(keyboard.IsKeyDown(Keys.Right)) _ourCamera.Position.X -= 1;
+ if(keyboard.IsKeyDown(Keys.Left)) _ourCamera.Position.X += 1;
if(keyboard.IsKeyDown(Keys.Q)) _ourCamera.Position.Y += 1;
if(keyboard.IsKeyDown(Keys.E)) _ourCamera.Position.Y -= 1;
_ourCamera.CameraTarget = _ourCamera.Position + new Vector3(0,0,1);
diff --git a/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.csproj.GenerateResource.cache b/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.csproj.GenerateResource.cache
index d152b674..c9027b81 100644
Binary files a/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.csproj.GenerateResource.cache and b/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.csproj.GenerateResource.cache differ
diff --git a/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.csprojAssemblyReference.cache b/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.csprojAssemblyReference.cache
index b9073f7d..f1d43f1d 100644
Binary files a/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.csprojAssemblyReference.cache and b/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.csprojAssemblyReference.cache differ
diff --git a/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.exe b/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.exe
index 43a10746..7b1bbdd9 100644
Binary files a/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.exe and b/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.exe differ
diff --git a/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.pdb b/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.pdb
index daebf883..5d962384 100644
Binary files a/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.pdb and b/3DRadSpace/3DRadSpace/obj/x86/Debug/3DRadSpace.pdb differ
diff --git a/3DRadSpace/3DRadSpaceDll/FPVCamera.cs b/3DRadSpace/3DRadSpaceDll/FPVCamera.cs
index b3f84793..31f9cd8f 100644
--- a/3DRadSpace/3DRadSpaceDll/FPVCamera.cs
+++ b/3DRadSpace/3DRadSpaceDll/FPVCamera.cs
@@ -133,8 +133,8 @@ public override void Update(MouseState mouse, KeyboardState keyboard, GameTime t
{
if (keyboard.IsKeyDown(Forward)) Position += Vector3.Transform(Vector3.UnitZ + Vector3.Up, Matrix.CreateFromYawPitchRoll(CamScreenCoords.X, 0, CamScreenCoords.Y)) * MovementSpeed;
if (keyboard.IsKeyDown(Backward)) Position -= Vector3.Transform(Vector3.UnitZ + Vector3.Up, Matrix.CreateFromYawPitchRoll(CamScreenCoords.X, 0, CamScreenCoords.Y)) * MovementSpeed;
- if (keyboard.IsKeyDown(Right)) Position += Vector3.Cross(CameraTarget, Vector3.Transform(Vector3.UnitZ + Vector3.Up, Matrix.CreateFromYawPitchRoll(CamScreenCoords.X, 0, CamScreenCoords.Y))) * MovementSpeed;
- if (keyboard.IsKeyDown(Left)) Position -= Vector3.Cross(CameraTarget, Vector3.Transform(Vector3.UnitZ + Vector3.Up, Matrix.CreateFromYawPitchRoll(CamScreenCoords.X, 0, CamScreenCoords.Y))) * MovementSpeed;
+ if (keyboard.IsKeyDown(Right)) Position -= Vector3.Cross(Vector3.Up, Vector3.Transform(Vector3.UnitZ + Vector3.Up, Matrix.CreateFromYawPitchRoll(CamScreenCoords.X, 0, CamScreenCoords.Y))) * MovementSpeed;
+ if (keyboard.IsKeyDown(Left)) Position += Vector3.Cross(Vector3.Up, Vector3.Transform(Vector3.UnitZ + Vector3.Up, Matrix.CreateFromYawPitchRoll(CamScreenCoords.X, 0, CamScreenCoords.Y))) * MovementSpeed;
Mouse.SetPosition((int)ScreenSize.X / 2,(int) ScreenSize.Y / 2);
CamScreenCoords += new Vector2((mouse.X - (ScreenSize.X / 2)) * (-Sensibility), (mouse.Y - (ScreenSize.Y / 2)) * Sensibility);
@@ -145,6 +145,23 @@ public override void Update(MouseState mouse, KeyboardState keyboard, GameTime t
///
///
///
+ ///
+ ///
+ public void Draw(out Matrix view, out Matrix projection)
+ {
+ if (!Enabled)
+ {
+ view = Matrix.Identity;
+ projection = Matrix.Identity;
+ return;
+ }
+ view = Matrix.CreateLookAt(Position, CameraTarget, Vector3.Up);
+ projection = Matrix.CreatePerspectiveFieldOfView(FOV, ScreenSize.X / ScreenSize.Y, MinDrawDist, MaxDrawDist);
+ base.Draw(null, view, projection); //Calls base class to get the event called too.
+ }
+ ///
+ ///
+ ///
///
///
///
diff --git a/3DRadSpace/3DRadSpaceDll/Project.cs b/3DRadSpace/3DRadSpaceDll/Project.cs
index 514376d1..4887cd9e 100644
--- a/3DRadSpace/3DRadSpaceDll/Project.cs
+++ b/3DRadSpace/3DRadSpaceDll/Project.cs
@@ -45,7 +45,7 @@ public static List Open(string filename)
{
FPVCamera c = new FPVCamera(Obj[1], Convert.ToBoolean(Obj[2],Main.CultureInfo), new Vector3(Convert.ToSingle(Obj[3],Main.CultureInfo), Convert.ToSingle(Obj[4],Main.CultureInfo), Convert.ToSingle(Obj[5],Main.CultureInfo)),
new Vector2(Convert.ToSingle(Obj[6],Main.CultureInfo), Convert.ToSingle(Obj[7], Main.CultureInfo)),
- new Vector3(Convert.ToSingle(Obj[9], Main.CultureInfo), Convert.ToSingle(Obj[9], Main.CultureInfo), Convert.ToSingle(Obj[10], Main.CultureInfo)),
+ new Vector3(Convert.ToSingle(Obj[8], Main.CultureInfo), Convert.ToSingle(Obj[9], Main.CultureInfo), Convert.ToSingle(Obj[10], Main.CultureInfo)),
MathHelper.ToRadians(Convert.ToSingle(Obj[11], Main.CultureInfo)), Convert.ToSingle(Obj[12], Main.CultureInfo), Convert.ToSingle(Obj[13], Main.CultureInfo),
(Keys)Convert.ToInt32(Obj[14], Main.CultureInfo),(Keys)Convert.ToInt32(Obj[15]),(Keys)Convert.ToInt32(Obj[16], Main.CultureInfo),(Keys)Convert.ToInt32(Obj[17], Main.CultureInfo),
Convert.ToSingle(Obj[18]),Convert.ToSingle(Obj[19], Main.CultureInfo));
@@ -316,7 +316,7 @@ public static void Save(string filename)
ToBeSaved[j] = "fpvcam " + fpv.Name + ' ' + fpv.Enabled + ' ' + Vector2String(fpv.Position) + ' ' + Vector2String(fpv.CamScreenCoords) +
' ' + Vector2String(fpv.CameraRotation) + ' ' + MathHelper.ToDegrees(fpv.FOV) + ' ' + fpv.MinDrawDist + ' ' + fpv.MaxDrawDist +
' ' + ((int)fpv.Forward) + ' ' + ((int)fpv.Left) + ' ' + ((int)fpv.Backward) + ' ' + ((int)fpv.Right) +
- ' ' + fpv.MovementSpeed + ' ' + fpv.Sensibility;
+ ' ' + fpv.MovementSpeed + ' ' + fpv.Sensibility.ToString(Main.CultureInfo);
}
if (Game.GameObjects[i] is Camera c)
{
diff --git a/3DRadSpace/3DRadSpaceDll/Skybox.cs b/3DRadSpace/3DRadSpaceDll/Skybox.cs
index 6847f881..2603743b 100644
--- a/3DRadSpace/3DRadSpaceDll/Skybox.cs
+++ b/3DRadSpace/3DRadSpaceDll/Skybox.cs
@@ -204,12 +204,12 @@ protected void Dispose(bool disposing)
if (_disposed) return;
if (disposing)
{
- NX.Dispose();
- NY.Dispose();
- NZ.Dispose();
- PX.Dispose();
- PY.Dispose();
- PZ.Dispose();
+ NX?.Dispose();
+ NY?.Dispose();
+ NZ?.Dispose();
+ PX?.Dispose();
+ PY?.Dispose();
+ PZ?.Dispose();
}
_disposed = true;
}
diff --git a/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.dll b/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.dll
index ef7e32ff..fbde359c 100644
Binary files a/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.dll and b/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.dll differ
diff --git a/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.pdb b/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.pdb
index c8142640..deb548bd 100644
Binary files a/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.pdb and b/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.pdb differ
diff --git a/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.xml b/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.xml
index 7fc08a6b..06ce403f 100644
--- a/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.xml
+++ b/3DRadSpace/3DRadSpaceDll/bin/Debug/3DRadSpaceDll.xml
@@ -659,6 +659,13 @@
+
+
+
+
+
+
+
diff --git a/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.csprojAssemblyReference.cache b/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.csprojAssemblyReference.cache
index 2e89c574..a3b9f400 100644
Binary files a/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.csprojAssemblyReference.cache and b/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.csprojAssemblyReference.cache differ
diff --git a/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.dll b/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.dll
index ef7e32ff..fbde359c 100644
Binary files a/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.dll and b/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.dll differ
diff --git a/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.pdb b/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.pdb
index c8142640..deb548bd 100644
Binary files a/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.pdb and b/3DRadSpace/3DRadSpaceDll/obj/Debug/3DRadSpaceDll.pdb differ
diff --git a/3DRadSpace/3DRadSpace_Player/3DRadSpace_Player.csproj.user b/3DRadSpace/3DRadSpace_Player/3DRadSpace_Player.csproj.user
index dccc7468..2f10f4d0 100644
--- a/3DRadSpace/3DRadSpace_Player/3DRadSpace_Player.csproj.user
+++ b/3DRadSpace/3DRadSpace_Player/3DRadSpace_Player.csproj.user
@@ -1,7 +1,8 @@
- "C:\Users\Athanatos\Documents\GitHub\3D_Rad_Space\3DRadSpace\3DRadSpace\bin\Windows\x86\Debug\Projects\Simple Movement Script.3drsp"
+ "C:\Users\Athanatos\Documents\GitHub\3D_Rad_Space\3DRadSpace\3DRadSpace\bin\Windows\x86\Debug\Projects\FPVCamera test.3drsp"
C:\Users\Athanatos\Documents\GitHub\3D_Rad_Space\3DRadSpace\3DRadSpace\bin\Windows\x86\Debug
+ false
\ No newline at end of file
diff --git a/3DRadSpace/3DRadSpace_Player/Game1.cs b/3DRadSpace/3DRadSpace_Player/Game1.cs
index caeb6be8..f49de990 100644
--- a/3DRadSpace/3DRadSpace_Player/Game1.cs
+++ b/3DRadSpace/3DRadSpace_Player/Game1.cs
@@ -56,24 +56,72 @@ protected override void LoadContent()
{
for (int i = 0; i < _3DRadSpaceDll.Game.GameObjects.Count; i++)
{
- if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c) c.Load(null);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Script script) script.Load(null);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Skinmesh sk) sk.Load(Content);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp) sp.Load(Content,GraphicsDevice);
- if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp) tp.Load(Content);
- if (_3DRadSpaceDll.Game.GameObjects[i] is SoundSource sounds) sounds.Load(Content);
- if (_3DRadSpaceDll.Game.GameObjects[i] is SoundEffect sound) sound.Load(Content);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb) sb.Load(Content, GraphicsDevice);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c)
+ {
+ c.Load(null);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Script script)
+ {
+ script.Load(null);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Skinmesh sk)
+ {
+ sk.Load(Content);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp)
+ {
+ sp.Load(Content, GraphicsDevice);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp)
+ {
+ tp.Load(Content);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is SoundSource sounds)
+ {
+ sounds.Load(Content);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is SoundEffect sound)
+ {
+ sound.Load(Content);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb)
+ {
+ sb.Load(Content, GraphicsDevice);
+ continue;
+ }
}
}
protected override void UnloadContent()
{
for (int i = 0; i < _3DRadSpaceDll.Game.GameObjects.Count; i++)
{
- if (_3DRadSpaceDll.Game.GameObjects[i] is Script script) script.End();
- if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp) sp.Dispose();
- if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp) tp.Dispose();
- if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb) sb.Dispose();
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Script script)
+ {
+ script.End();
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp)
+ {
+ sp.Dispose();
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp)
+ {
+ tp.Dispose();
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb)
+ {
+ sb.Dispose();
+ continue;
+ }
}
}
protected override void Update(GameTime gameTime)
@@ -82,14 +130,51 @@ protected override void Update(GameTime gameTime)
KeyboardState keyboard = Keyboard.GetState();
for (int i = 0; i < _3DRadSpaceDll.Game.GameObjects.Count; i++)
{
- if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c) c.Update(mouse, keyboard, gameTime);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Script s) s.Update(mouse, keyboard, gameTime);
- if (_3DRadSpaceDll.Game.GameObjects[i] is EventOnLocation eol) eol.Update(mouse, keyboard, gameTime);
- if (_3DRadSpaceDll.Game.GameObjects[i] is EventOnKey eok) eok.Update(mouse, keyboard, gameTime);
- if (_3DRadSpaceDll.Game.GameObjects[i] is Timer t) t.Update(mouse, keyboard, gameTime);
- if (_3DRadSpaceDll.Game.GameObjects[i] is ExitFade ef) ef.Update(mouse, keyboard, gameTime);
- if (_3DRadSpaceDll.Game.GameObjects[i] is SoundSource sounds) sounds.Update(mouse, keyboard, gameTime);
- if (_3DRadSpaceDll.Game.GameObjects[i] is SoundEffect sef) sef.Update(mouse, keyboard, gameTime);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is FPVCamera fps)
+ {
+ fps.Update(mouse, keyboard, gameTime);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c)
+ {
+ c.Update(mouse, keyboard, gameTime);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Script s)
+ {
+ s.Update(mouse, keyboard, gameTime);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is EventOnLocation eol)
+ {
+ eol.Update(mouse, keyboard, gameTime);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is EventOnKey eok)
+ {
+ eok.Update(mouse, keyboard, gameTime);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Timer t)
+ {
+ t.Update(mouse, keyboard, gameTime);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is ExitFade ef)
+ {
+ ef.Update(mouse, keyboard, gameTime);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is SoundSource sounds)
+ {
+ sounds.Update(mouse, keyboard, gameTime);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is SoundEffect sef)
+ {
+ sef.Update(mouse, keyboard, gameTime);
+ continue;
+ }
}
base.Update(gameTime);
}
@@ -103,15 +188,33 @@ protected override void Draw(GameTime gameTime)
for (int i = 0; i < _3DRadSpaceDll.Game.GameObjects.Count; i++)
{
- if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c) c.Draw(null,out view,out projection);
- if (_3DRadSpaceDll.Game.GameObjects[i] is SkyColor s) ClearColor = s.Color;
- if (_3DRadSpaceDll.Game.GameObjects[i] is Script script) script.Draw(spriteBatch, view, projection);
+ if(_3DRadSpaceDll.Game.GameObjects[i] is FPVCamera fps)
+ {
+ fps.Draw(out view,out projection);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Camera c)
+ {
+ c.Draw(null, out view, out projection);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is SkyColor s)
+ {
+ ClearColor = s.Color;
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Script script)
+ {
+ script.Draw(spriteBatch, view, projection);
+ continue;
+ }
if (_3DRadSpaceDll.Game.GameObjects[i] is Fog f)
{
FogEnabled = f.Enabled;
FogColor = f.FogColor;
FogStart = f.FogStart;
FogEnd = f.FogEnd;
+ continue;
}
if (_3DRadSpaceDll.Game.GameObjects[i] is Skinmesh skinmesh)
{
@@ -126,14 +229,27 @@ protected override void Draw(GameTime gameTime)
}
}
skinmesh.Draw(null, view, projection);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb)
+ {
+ sb.Draw(null, view, projection);
+ continue;
}
- if (_3DRadSpaceDll.Game.GameObjects[i] is Skybox sb) sb.Draw(null, view, projection);
}
spriteBatch.Begin();
for(int i=0; i < _3DRadSpaceDll.Game.GameObjects.Count;i++)
{
- if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp) sp.Draw(spriteBatch, null, null);
- if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp) tp.Draw(spriteBatch, null, null);
+ if (_3DRadSpaceDll.Game.GameObjects[i] is Sprite sp)
+ {
+ sp.Draw(spriteBatch, null, null);
+ continue;
+ }
+ if (_3DRadSpaceDll.Game.GameObjects[i] is TextPrint tp)
+ {
+ tp.Draw(spriteBatch, null, null);
+ continue;
+ }
}
spriteBatch.End();
base.Draw(gameTime);
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.dll b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.dll
index ef7e32ff..2d34e5c8 100644
Binary files a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.dll and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.dll differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.pdb b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.pdb
index c8142640..df99dce5 100644
Binary files a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.pdb and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.pdb differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.xml b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.xml
index 7fc08a6b..06ce403f 100644
--- a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.xml
+++ b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpaceDll.xml
@@ -659,6 +659,13 @@
+
+
+
+
+
+
+
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpace_Player.exe b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpace_Player.exe
index cff97f94..0fb4710f 100644
Binary files a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpace_Player.exe and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpace_Player.exe differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpace_Player.pdb b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpace_Player.pdb
index e0f43f8f..5fd1bbba 100644
Binary files a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpace_Player.pdb and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/3DRadSpace_Player.pdb differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox.sky b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox.sky
new file mode 100644
index 00000000..6fedfd30
--- /dev/null
+++ b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox.sky
@@ -0,0 +1,6 @@
+skybox_px.jpg
+skybox_py.jpg
+skybox_pz.jpg
+skybox_nx.jpg
+skybox_ny.jpg
+skybox_nz.jpg
\ No newline at end of file
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_nx.jpg b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_nx.jpg
new file mode 100644
index 00000000..543506f5
Binary files /dev/null and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_nx.jpg differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_ny.jpg b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_ny.jpg
new file mode 100644
index 00000000..b71518b8
Binary files /dev/null and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_ny.jpg differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_nz.jpg b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_nz.jpg
new file mode 100644
index 00000000..47355626
Binary files /dev/null and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_nz.jpg differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_px.jpg b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_px.jpg
new file mode 100644
index 00000000..75543e9f
Binary files /dev/null and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_px.jpg differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_py.jpg b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_py.jpg
new file mode 100644
index 00000000..b7d4ba9e
Binary files /dev/null and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_py.jpg differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_pz.jpg b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_pz.jpg
new file mode 100644
index 00000000..6c47c5c9
Binary files /dev/null and b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/TestSkybox/skybox_pz.jpg differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/skybox-template.png b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/skybox-template.png
deleted file mode 100644
index 6b1647e3..00000000
Binary files a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/skybox-template.png and /dev/null differ
diff --git a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/skybox-texture-mapping-cube-mapping-png-favpng-JLZ1k1UkLbsjBD6RK2RR4AJ6B.jpg b/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/skybox-texture-mapping-cube-mapping-png-favpng-JLZ1k1UkLbsjBD6RK2RR4AJ6B.jpg
deleted file mode 100644
index b2143415..00000000
Binary files a/3DRadSpace/3DRadSpace_Player/bin/Windows/x86/Debug/Content/Skybox/skybox-texture-mapping-cube-mapping-png-favpng-JLZ1k1UkLbsjBD6RK2RR4AJ6B.jpg and /dev/null differ
diff --git a/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.csprojAssemblyReference.cache b/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.csprojAssemblyReference.cache
index 986237e4..8a2f4f17 100644
Binary files a/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.csprojAssemblyReference.cache and b/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.csprojAssemblyReference.cache differ
diff --git a/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.exe b/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.exe
index cff97f94..0fb4710f 100644
Binary files a/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.exe and b/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.exe differ
diff --git a/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.pdb b/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.pdb
index e0f43f8f..5fd1bbba 100644
Binary files a/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.pdb and b/3DRadSpace/3DRadSpace_Player/obj/x86/Debug/3DRadSpace_Player.pdb differ