Переглянути джерело

Adding pure C# 3D template

Josh Engebretson 9 роки тому
батько
коміт
6d93bc2140

+ 0 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Project3D.atomic


+ 15 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Components/Spinner.cs

@@ -0,0 +1,15 @@
+using System;
+using AtomicEngine;
+
+public class Spinner : CSComponent
+{
+
+    [Inspector]
+    float speed = 1.0f;    
+
+    void Update(float timeStep)
+    {
+        Node.Yaw(speed * timeStep * 75.0f);
+    }
+
+}

+ 5 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Components/Spinner.cs.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "7d2197a4d7e117426aefe04d33c041bc",
+	"CSharpImporter": null
+}

BIN
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Models/Chest.fbx


+ 9 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Models/Chest.fbx.asset

@@ -0,0 +1,9 @@
+{
+	"version": 1,
+	"guid": "2788364e8ff6f81f4b566a9d58e3fb5b",
+	"ModelImporter": {
+		"scale": 0.01,
+		"importAnimations": false,
+		"animInfo": []
+	}
+}

+ 15 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Models/Materials/DefaultMaterial.material

@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<material>
+	<technique name="Techniques/Diff.xml" quality="0" loddistance="0" />
+	<texture unit="diffuse" name="Textures/Chest.png" />
+	<parameter name="UOffset" value="1 0 0 0" />
+	<parameter name="VOffset" value="0 1 0 0" />
+	<parameter name="MatDiffColor" value="0.8 0.8 0.8 1" />
+	<parameter name="MatEmissiveColor" value="0 0 0 1" />
+	<parameter name="MatEnvMapColor" value="1 1 1" />
+	<parameter name="MatSpecColor" value="0.5 0.5 0.5 16" />
+	<cull value="ccw" />
+	<shadowcull value="ccw" />
+	<fill value="solid" />
+	<depthbias constant="0" slopescaled="0" />
+</material>

+ 78 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Scenes/Scene.scene

@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<scene id="1">
+	<attribute name="Name" value="" />
+	<attribute name="Time Scale" value="1" />
+	<attribute name="Smoothing Constant" value="50" />
+	<attribute name="Snap Threshold" value="5" />
+	<attribute name="Elapsed Time" value="0" />
+	<attribute name="Next Replicated Node ID" value="365" />
+	<attribute name="Next Replicated Component ID" value="1979" />
+	<attribute name="Next Local Node ID" value="16778496" />
+	<attribute name="Next Local Component ID" value="16777216" />
+	<attribute name="Variables" />
+	<attribute name="Variable Names" value="" />
+	<component type="PhysicsWorld" id="1" />
+	<component type="Octree" id="2" />
+	<component type="DebugRenderer" id="3" />
+	<node id="2">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Zone" />
+		<attribute name="Position" value="0 0 0" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="Zone" id="4">
+			<attribute name="Bounding Box Min" value="-10000 -10000 -10000" />
+			<attribute name="Bounding Box Max" value="10000 10000 10000" />
+			<attribute name="Ambient Color" value="0.4 0.4 0.4 1" />
+		</component>
+	</node>
+	<node id="3">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="GlobalLight" />
+		<attribute name="Position" value="0 0 0" />
+		<attribute name="Rotation" value="0.888074 0.325058 -0.325058 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="Light" id="5">
+			<attribute name="Light Type" value="Directional" />
+			<attribute name="Cast Shadows" value="true" />
+			<attribute name="CSM Splits" value="10 20 50 0" />
+			<attribute name="View Size Quantize" value="1" />
+			<attribute name="View Size Minimum" value="5" />
+			<attribute name="Depth Constant Bias" value="0.00025" />
+			<attribute name="Depth Slope Bias" value="0.001" />
+		</component>
+	</node>
+	<node id="361">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Camera" />
+		<attribute name="Position" value="0 0 -2" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="Camera" id="1973" />
+	</node>
+	<node id="363">
+		<attribute name="Is Enabled" value="true" />
+		<attribute name="Name" value="Chest" />
+		<attribute name="Position" value="0 -0.374877 2" />
+		<attribute name="Rotation" value="1 0 0 0" />
+		<attribute name="Scale" value="1 1 1" />
+		<attribute name="Variables" />
+		<component type="StaticModel" id="1975">
+			<attribute name="Model" value="Model;2788364e8ff6f81f4b566a9d58e3fb5b.mdl" />
+			<attribute name="Material" value="Material;Models/Materials/DefaultMaterial.material" />
+			<attribute name="Geometry Enabled">
+				<variant type="Bool" value="true" />
+			</attribute>
+		</component>
+		<component type="CSComponent" id="1978">
+			<attribute name="FieldValues">
+				<variant hash="273365031" type="Float" value="3" />
+			</attribute>
+			<attribute name="Assembly" value="CSComponentAssembly;AtomicProject.dll" />
+			<attribute name="Class" value="Spinner" />
+		</component>
+	</node>
+</scene>

+ 8 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Scenes/Scene.scene.asset

@@ -0,0 +1,8 @@
+{
+	"version": 1,
+	"guid": "98e007a9cb157345b1887ea30fa9cd06",
+	"SceneImporter": {
+		"sceneCamRotation": "1 0 0 0",
+		"sceneCamPosition": "0 0 0"
+	}
+}

+ 16 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Scripts/Program.cs

@@ -0,0 +1,16 @@
+using AtomicEngine;
+using AtomicPlayer;
+
+public static class AtomicMain
+{
+    /// <summary>
+    /// The main entry point for the application.
+    /// </summary>
+    static void Main(string[] args)
+    {
+
+        AtomicNET.GetSubsystem<Player>().LoadScene("Scenes/Scene.scene");
+
+    }
+    
+}

+ 5 - 0
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Scripts/Program.cs.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "c7b1ed8a45b7704ba0fdffc94b582b55",
+	"CSharpImporter": null
+}

BIN
Data/AtomicEditor/ProjectTemplates/Project3D/CSharp/Resources/Textures/Chest.png


+ 4 - 0
Data/AtomicEditor/ProjectTemplates/ProjectTemplates.json

@@ -28,6 +28,10 @@
             {
             {
                 "folder": "Project3D/TypeScript",
                 "folder": "Project3D/TypeScript",
                 "language": "TypeScript"
                 "language": "TypeScript"
+            },
+            {
+                "folder": "Project3D/CSharp",
+                "language": "CSharp"
             }
             }
         ]
         ]
     },
     },