summaryrefslogtreecommitdiff
path: root/Box2d/Assets/Program
diff options
context:
space:
mode:
Diffstat (limited to 'Box2d/Assets/Program')
-rw-r--r--Box2d/Assets/Program/Box2d/Properties.meta8
-rw-r--r--Box2d/Assets/Program/Box2d/Properties/AssemblyInfo.cs36
-rw-r--r--Box2d/Assets/Program/Box2d/Properties/AssemblyInfo.cs.meta11
-rw-r--r--Box2d/Assets/Program/Test.meta8
-rw-r--r--Box2d/Assets/Program/Test/ApplicationMain.cs40
-rw-r--r--Box2d/Assets/Program/Test/ApplicationMain.cs.meta11
-rw-r--r--Box2d/Assets/Program/Test/DontDestroyOnLoad.cs13
-rw-r--r--Box2d/Assets/Program/Test/DontDestroyOnLoad.cs.meta11
8 files changed, 138 insertions, 0 deletions
diff --git a/Box2d/Assets/Program/Box2d/Properties.meta b/Box2d/Assets/Program/Box2d/Properties.meta
new file mode 100644
index 0000000..6aaffc5
--- /dev/null
+++ b/Box2d/Assets/Program/Box2d/Properties.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7c4ee467041d7054a88577b9e498be90
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Box2d/Assets/Program/Box2d/Properties/AssemblyInfo.cs b/Box2d/Assets/Program/Box2d/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..3d6b9cd
--- /dev/null
+++ b/Box2d/Assets/Program/Box2d/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("Box2DX")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Box2DX")]
+[assembly: AssemblyCopyright("Copyright (c) 2008 Ihar Kalasouski http://code.google.com/p/box2dx")]
+[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("0164b8c9-6d35-419c-a4c1-05217f6f2f7a")]
+
+// 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("2.0.1.*")]
+[assembly: AssemblyFileVersion("2.0.1.0")]
diff --git a/Box2d/Assets/Program/Box2d/Properties/AssemblyInfo.cs.meta b/Box2d/Assets/Program/Box2d/Properties/AssemblyInfo.cs.meta
new file mode 100644
index 0000000..4805537
--- /dev/null
+++ b/Box2d/Assets/Program/Box2d/Properties/AssemblyInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 82127baaa1730684590b28c5dce9f6d6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Box2d/Assets/Program/Test.meta b/Box2d/Assets/Program/Test.meta
new file mode 100644
index 0000000..3018498
--- /dev/null
+++ b/Box2d/Assets/Program/Test.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cb44a5912cadba440b51ae5ea814a52f
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Box2d/Assets/Program/Test/ApplicationMain.cs b/Box2d/Assets/Program/Test/ApplicationMain.cs
new file mode 100644
index 0000000..bec4540
--- /dev/null
+++ b/Box2d/Assets/Program/Test/ApplicationMain.cs
@@ -0,0 +1,40 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Box2DX;
+using Box2DX.Dynamics;
+using Box2DX.Collision;
+using Box2DX.Common;
+
+public class ApplicationMain : MonoBehaviour
+{
+
+
+ public Material material;
+
+ void OnPostRender()
+ {
+ //绘制正四边形,提供的坐标必须是顺时针或者逆时针
+ Draw(100, 100, 100, 200, 200, 200, 200, 100);
+ //绘制无规则四边形
+ Draw(15, 5, 10, 115, 95, 110, 90, 10);
+ }
+
+ //绘制四边形,四个点坐标
+ void Draw(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
+ {
+ GL.PushMatrix();
+ //material.SetPass(0);//设置该材质通道,0为默认值
+ GL.LoadOrtho();//设置绘制2d图像
+ GL.Begin(GL.QUADS);//绘制类型为四边形
+
+ GL.Vertex3(x1 / Screen.width, y1 / Screen.height, 0);
+ GL.Vertex3(x2 / Screen.width, y2 / Screen.height, 0);
+ GL.Vertex3(x3 / Screen.width, y3 / Screen.height, 0);
+ GL.Vertex3(x4 / Screen.width, y4 / Screen.height, 0);
+
+ GL.End();
+ GL.PopMatrix();
+ }
+
+}
diff --git a/Box2d/Assets/Program/Test/ApplicationMain.cs.meta b/Box2d/Assets/Program/Test/ApplicationMain.cs.meta
new file mode 100644
index 0000000..0b20af6
--- /dev/null
+++ b/Box2d/Assets/Program/Test/ApplicationMain.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2dc4697d525f9454e9497e4fc4ac0a66
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs b/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs
new file mode 100644
index 0000000..0ea2e7f
--- /dev/null
+++ b/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs
@@ -0,0 +1,13 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class DontDestroyOnLoad : MonoBehaviour
+{
+
+ private void Awake()
+ {
+ DontDestroyOnLoad(gameObject);
+ }
+
+}
diff --git a/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs.meta b/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs.meta
new file mode 100644
index 0000000..579b1fd
--- /dev/null
+++ b/Box2d/Assets/Program/Test/DontDestroyOnLoad.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bc2944ec2555cbb4f831f0702cc76c95
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: