Selaa lähdekoodia

Basic3D AtomicNET examples

JoshEngebretson 10 vuotta sitten
vanhempi
sitoutus
efcedbbd6d
27 muutettua tiedostoa jossa 386 lisäystä ja 0 poistoa
  1. 6 0
      AtomicNET/Basic3D/.gitignore
  2. 9 0
      AtomicNET/Basic3D/Basic3D.atomic
  3. 37 0
      AtomicNET/Basic3D/BuildSettings.json
  4. 5 0
      AtomicNET/Basic3D/Resources.asset
  5. 5 0
      AtomicNET/Basic3D/Resources/Assemblies.asset
  6. BIN
      AtomicNET/Basic3D/Resources/Assemblies/Basic3D.dll
  7. 37 0
      AtomicNET/Basic3D/Resources/Assemblies/Basic3D.dll.asset
  8. 5 0
      AtomicNET/Basic3D/Resources/Models.asset
  9. BIN
      AtomicNET/Basic3D/Resources/Models/Chest.fbx
  10. 9 0
      AtomicNET/Basic3D/Resources/Models/Chest.fbx.asset
  11. 5 0
      AtomicNET/Basic3D/Resources/Models/Materials.asset
  12. 15 0
      AtomicNET/Basic3D/Resources/Models/Materials/DefaultMaterial.material
  13. 5 0
      AtomicNET/Basic3D/Resources/Models/Materials/DefaultMaterial.material.asset
  14. 5 0
      AtomicNET/Basic3D/Resources/Scenes.asset
  15. 76 0
      AtomicNET/Basic3D/Resources/Scenes/Scene.scene
  16. 5 0
      AtomicNET/Basic3D/Resources/Scenes/Scene.scene.asset
  17. 5 0
      AtomicNET/Basic3D/Resources/Scripts.asset
  18. 3 0
      AtomicNET/Basic3D/Resources/Scripts/main.js
  19. 7 0
      AtomicNET/Basic3D/Resources/Scripts/main.js.asset
  20. 5 0
      AtomicNET/Basic3D/Resources/Textures.asset
  21. BIN
      AtomicNET/Basic3D/Resources/Textures/chest.png
  22. 5 0
      AtomicNET/Basic3D/Resources/Textures/chest.png.asset
  23. 52 0
      AtomicNET/Basic3D/Source/Basic3D/Basic3D.csproj
  24. 22 0
      AtomicNET/Basic3D/Source/Basic3D/Basic3D.sln
  25. 36 0
      AtomicNET/Basic3D/Source/Basic3D/Properties/AssemblyInfo.cs
  26. 22 0
      AtomicNET/Basic3D/Source/Basic3D/Spinner.cs
  27. 5 0
      Basic3D/Resources/Assemblies.asset

+ 6 - 0
AtomicNET/Basic3D/.gitignore

@@ -0,0 +1,6 @@
+UserPrefs.json
+*.pdb
+Cache/*
+Source/Basic3D/.vs
+Source/Basic3D/bin
+Source/Basic3D/obj

+ 9 - 0
AtomicNET/Basic3D/Basic3D.atomic

@@ -0,0 +1,9 @@
+{
+   "version": 1,
+   "project": {
+      "version": "1.0.0"
+   },
+   "platforms": [
+      "mac", "windows"
+   ]
+}

+ 37 - 0
AtomicNET/Basic3D/BuildSettings.json

@@ -0,0 +1,37 @@
+{
+   "MacBuildSettings": {
+      "appName": "",
+      "packageName": "",
+      "companyName": "",
+      "productName": ""
+   },
+   "WindowsBuildSettings": {
+      "appName": "",
+      "packageName": "",
+      "companyName": "",
+      "productName": ""
+   },
+   "WebBuildSettings": {
+      "appName": "",
+      "packageName": "",
+      "companyName": "",
+      "productName": ""
+   },
+   "AndroidBuildSettings": {
+      "appName": "",
+      "packageName": "",
+      "companyName": "",
+      "productName": "",
+      "targetSDKVersion": "",
+      "minSDKVersion": "",
+      "activityName": ""
+   },
+   "IOSBuildSettings": {
+      "appName": "",
+      "packageName": "",
+      "companyName": "",
+      "productName": "",
+      "provisionFile": "",
+      "appIDPrefix": ""
+   }
+}

+ 5 - 0
AtomicNET/Basic3D/Resources.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "8b49c25ca8bcdf0fb11ea8bd906e9c60",
+	"FolderImporter": {}
+}

+ 5 - 0
AtomicNET/Basic3D/Resources/Assemblies.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "b6dd3280dc3a8dba2d752e61546c43d4",
+	"FolderImporter": {}
+}

BIN
AtomicNET/Basic3D/Resources/Assemblies/Basic3D.dll


+ 37 - 0
AtomicNET/Basic3D/Resources/Assemblies/Basic3D.dll.asset

@@ -0,0 +1,37 @@
+{
+	"version": 1,
+	"guid": "3245844d97444425580f5c0ed275e125",
+	"NETAssemblyImporter": {
+		"AssemblyJSON": {
+			"enums": [],
+			"components": [
+				{
+					"name": "Spinner",
+					"namespace": "Basic3D",
+					"fields": [
+						{
+							"isEnum": false,
+							"typeName": "Single",
+							"name": "speed",
+							"defaultValue": "1",
+							"caPos": [
+								""
+							],
+							"caNamed": {}
+						},
+						{
+							"isEnum": false,
+							"typeName": "Single",
+							"name": "pitchSpeed",
+							"defaultValue": "0",
+							"caPos": [
+								""
+							],
+							"caNamed": {}
+						}
+					]
+				}
+			]
+		}
+	}
+}

+ 5 - 0
AtomicNET/Basic3D/Resources/Models.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "859450fc1d20b9dd7e1e3da995cbdbd3",
+	"FolderImporter": {}
+}

BIN
AtomicNET/Basic3D/Resources/Models/Chest.fbx


+ 9 - 0
AtomicNET/Basic3D/Resources/Models/Chest.fbx.asset

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

+ 5 - 0
AtomicNET/Basic3D/Resources/Models/Materials.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "6314dcdd026d028868140a1dde113f6d",
+	"FolderImporter": {}
+}

+ 15 - 0
AtomicNET/Basic3D/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.1 0.1 0.1 16" />
+	<cull value="ccw" />
+	<shadowcull value="ccw" />
+	<fill value="solid" />
+	<depthbias constant="0" slopescaled="0" />
+</material>

+ 5 - 0
AtomicNET/Basic3D/Resources/Models/Materials/DefaultMaterial.material.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "3c0204d84c70d3c07c032dd8fbe84662",
+	"MaterialImporter": {}
+}

+ 5 - 0
AtomicNET/Basic3D/Resources/Scenes.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "650634c8bf1c932ee41641c71d81de6f",
+	"FolderImporter": {}
+}

+ 76 - 0
AtomicNET/Basic3D/Resources/Scenes/Scene.scene

@@ -0,0 +1,76 @@
+<?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="379" />
+	<attribute name="Next Replicated Component ID" value="1993" />
+	<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 0" />
+		<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;Cache/b00f01294b1cc469d4db9f862c9296b7.mdl" />
+			<attribute name="Material" value="Material;Models/Materials/DefaultMaterial.material" />
+		</component>
+		<component type="CSComponent" id="1981">
+			<attribute name="FieldValues">
+				<variant hash="273365031" type="Float" value="1" />
+				<variant hash="4101335591" type="Float" value="4" />
+			</attribute>
+			<attribute name="Assembly" value="NETAssemblyFile;Assemblies/Basic3D.dll" />
+			<attribute name="Class" value="Spinner" />
+		</component>
+	</node>
+</scene>

+ 5 - 0
AtomicNET/Basic3D/Resources/Scenes/Scene.scene.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "09945dd5d85bcaedfd1a2751aefc738b",
+	"SceneImporter": {}
+}

+ 5 - 0
AtomicNET/Basic3D/Resources/Scripts.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "d64fec1650e6d0c76d855ba7e5720eb4",
+	"FolderImporter": {}
+}

+ 3 - 0
AtomicNET/Basic3D/Resources/Scripts/main.js

@@ -0,0 +1,3 @@
+// This script is the main entry point of the game
+//Load scene
+Atomic.player.loadScene("Scenes/Scene.scene");

+ 7 - 0
AtomicNET/Basic3D/Resources/Scripts/main.js.asset

@@ -0,0 +1,7 @@
+{
+	"version": 1,
+	"guid": "b26472030333c06522cb499311fbb1be",
+	"JavascriptImporter": {
+		"IsComponentFile": false
+	}
+}

+ 5 - 0
AtomicNET/Basic3D/Resources/Textures.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "9ec8556a2f8b8bb06eeef7d1ae560a22",
+	"FolderImporter": {}
+}

BIN
AtomicNET/Basic3D/Resources/Textures/chest.png


+ 5 - 0
AtomicNET/Basic3D/Resources/Textures/chest.png.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "6cfc1364a9a11584ea54f3384387e250",
+	"TextureImporter": {}
+}

+ 52 - 0
AtomicNET/Basic3D/Source/Basic3D/Basic3D.csproj

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{E414232C-7886-473D-A0F0-A891A3935A78}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Basic3D</RootNamespace>
+    <AssemblyName>Basic3D</AssemblyName>
+    <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\Resources\Assemblies\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\Resources\Assemblies\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="AtomicNETEngine">
+      <HintPath>..\..\..\..\..\AtomicGameEngine\Artifacts\AtomicNET\AtomicNETEngine.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Spinner.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 22 - 0
AtomicNET/Basic3D/Source/Basic3D/Basic3D.sln

@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic3D", "Basic3D.csproj", "{E414232C-7886-473D-A0F0-A891A3935A78}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{E414232C-7886-473D-A0F0-A891A3935A78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E414232C-7886-473D-A0F0-A891A3935A78}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E414232C-7886-473D-A0F0-A891A3935A78}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{E414232C-7886-473D-A0F0-A891A3935A78}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 36 - 0
AtomicNET/Basic3D/Source/Basic3D/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Basic3D")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Basic3D")]
+[assembly: AssemblyCopyright("Copyright ©  2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e414232c-7886-473d-a0f0-a891a3935a78")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 22 - 0
AtomicNET/Basic3D/Source/Basic3D/Spinner.cs

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

+ 5 - 0
Basic3D/Resources/Assemblies.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "b6dd3280dc3a8dba2d752e61546c43d4",
+	"FolderImporter": {}
+}