hmm
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,3 +13,6 @@ Source/**/*.Gen.cs
|
||||
Output/*
|
||||
*/SceneData/*/Lightmaps/*
|
||||
*/SceneData/*/SkyLights/*
|
||||
.vscode/
|
||||
Assets/
|
||||
Source/obj/
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,93 +0,0 @@
|
||||
Copyright 2019 The Oxanium Project Authors (https://github.com/sevmeyer/oxanium)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,93 +0,0 @@
|
||||
Copyright 2016 The Saira Project Authors (omnibus.type@gmail.com), with reserved font name "Saira".
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -1,9 +0,0 @@
|
||||
newmtl common/clip
|
||||
newmtl common/trigger
|
||||
newmtl dev/dev_128_blue
|
||||
newmtl dev/dev_128_gray
|
||||
newmtl dev/dev_128_green
|
||||
newmtl dev/dev_128_lightgray
|
||||
newmtl dev/dev_128_red
|
||||
newmtl dev/dev_128_white
|
||||
newmtl dev/dev_128_yellow
|
||||
11634
Assets/aerowalk.obj
11634
Assets/aerowalk.obj
File diff suppressed because it is too large
Load Diff
41
Content/Common/FreeCameraPrefab.prefab
Normal file
41
Content/Common/FreeCameraPrefab.prefab
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"ID": "a758a40643bd14cfc9d5aa82b18d8f5b",
|
||||
"TypeName": "FlaxEngine.Prefab",
|
||||
"EngineBuild": 6216,
|
||||
"Data": [
|
||||
{
|
||||
"ID": "f2c8a72a46f3dd357fa0ff89a45949f6",
|
||||
"TypeName": "FlaxEngine.EmptyActor",
|
||||
"ParentID": "00000000000000000000000000000000",
|
||||
"Name": "FreeCameraPrefab",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 0.0,
|
||||
"Y": 0.0,
|
||||
"Z": -39.085968017578128
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "754c73c64884e8d205b2c2a8a62148e3",
|
||||
"TypeName": "Game.CameraMovement",
|
||||
"ParentID": "f2c8a72a46f3dd357fa0ff89a45949f6",
|
||||
"V": {}
|
||||
},
|
||||
{
|
||||
"ID": "35fdc5fd4ca5fea9e80b67ad5b5027cb",
|
||||
"TypeName": "FlaxEngine.Camera",
|
||||
"ParentID": "f2c8a72a46f3dd357fa0ff89a45949f6",
|
||||
"Name": "Camera",
|
||||
"Near": 1.0
|
||||
},
|
||||
{
|
||||
"ID": "eb48934340a9ad2cae0c2b891503277d",
|
||||
"TypeName": "FlaxEngine.SphereCollider",
|
||||
"ParentID": "f2c8a72a46f3dd357fa0ff89a45949f6",
|
||||
"Name": "SphereCollider",
|
||||
"Material": "d99b8b6f40198beea4703dadd642150e",
|
||||
"Radius": 10.0
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
13
Content/PhysicsMaterials/Physical Material 0.json
Normal file
13
Content/PhysicsMaterials/Physical Material 0.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ID": "d99b8b6f40198beea4703dadd642150e",
|
||||
"TypeName": "FlaxEngine.PhysicalMaterial",
|
||||
"EngineBuild": 6216,
|
||||
"Data": {
|
||||
"Friction": 0.0,
|
||||
"FrictionCombineMode": 2,
|
||||
"OverrideFrictionCombineMode": true,
|
||||
"Restitution": 0.0,
|
||||
"RestitutionCombineMode": 1,
|
||||
"OverrideRestitutionCombineMode": true
|
||||
}
|
||||
}
|
||||
13
Content/PhysicsMaterials/PlayerPhysicsMaterial.json
Normal file
13
Content/PhysicsMaterials/PlayerPhysicsMaterial.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ID": "ffe0e84c49607480f67a3994a7fe11a8",
|
||||
"TypeName": "FlaxEngine.PhysicalMaterial",
|
||||
"EngineBuild": 6216,
|
||||
"Data": {
|
||||
"Friction": 30.0,
|
||||
"FrictionCombineMode": 2,
|
||||
"OverrideFrictionCombineMode": false,
|
||||
"Restitution": 0.0,
|
||||
"RestitutionCombineMode": 1,
|
||||
"OverrideRestitutionCombineMode": true
|
||||
}
|
||||
}
|
||||
@@ -6,15 +6,22 @@
|
||||
{
|
||||
"ID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"TypeName": "FlaxEngine.Scene",
|
||||
"Lightmaps": [
|
||||
{
|
||||
"Lightmap0": "8a601f534f84963a6fbe9ca240c22a84",
|
||||
"Lightmap1": "061b8e6a40935db6ae11218ee242b093",
|
||||
"Lightmap2": "5ee4f2594730fff9b6bea69ec16079a9"
|
||||
}
|
||||
],
|
||||
"LightmapSettings": {
|
||||
"IndirectLightingIntensity": 1.0,
|
||||
"IndirectLightingIntensity": 3.0,
|
||||
"GlobalObjectsScale": 1.0,
|
||||
"ChartsPadding": 3,
|
||||
"AtlasSize": 1024,
|
||||
"BounceCount": 1,
|
||||
"CompressLightmaps": true,
|
||||
"CompressLightmaps": false,
|
||||
"UseGeometryWithNoMaterials": true,
|
||||
"Quality": 1
|
||||
"Quality": 100
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -33,8 +40,8 @@
|
||||
"V": {
|
||||
"Order": -999999999,
|
||||
"Size": {
|
||||
"X": 829.0,
|
||||
"Y": 450.0
|
||||
"X": 1439.0,
|
||||
"Y": 818.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -55,31 +62,65 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "f23b32ac4b8839a306a1b394222824af",
|
||||
"PrefabID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"PrefabObjectID": "87a5405b4a75c2e317c0e99c737ed20c",
|
||||
"ID": "4ef1f38b4569142b55b0ff935525d47a",
|
||||
"TypeName": "FlaxEngine.RigidBody",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "PlayerPrefab",
|
||||
"Transform": {}
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -82.89323425292969,
|
||||
"Y": 108.37522888183594,
|
||||
"Z": 114.5750503540039
|
||||
}
|
||||
},
|
||||
"Mass": 3784.5869140625,
|
||||
"LinearDamping": 0.0,
|
||||
"AngularDamping": 0.0,
|
||||
"Constraints": 56,
|
||||
"EnableGravity": false
|
||||
},
|
||||
{
|
||||
"ID": "15f3be084b5f8de5ef4332b0aeb2a994",
|
||||
"PrefabID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"PrefabObjectID": "18b5d58241ae50d4c3fdf2942cbcefda",
|
||||
"ParentID": "f23b32ac4b8839a306a1b394222824af",
|
||||
"ID": "e3bab01a4912873fc2e9ff855a214bf7",
|
||||
"TypeName": "Game.PlayerMovement",
|
||||
"ParentID": "4ef1f38b4569142b55b0ff935525d47a",
|
||||
"V": {}
|
||||
},
|
||||
{
|
||||
"ID": "6f99f0cf4ccef10c2ba29db205c069e4",
|
||||
"PrefabID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"PrefabObjectID": "8e4e59954c3348a327b01fbe314b2a43",
|
||||
"ParentID": "f23b32ac4b8839a306a1b394222824af"
|
||||
"ID": "08ed03be4d537814ba01edb88f6801e1",
|
||||
"TypeName": "FlaxEngine.EmptyActor",
|
||||
"ParentID": "4ef1f38b4569142b55b0ff935525d47a",
|
||||
"Name": "RootActor"
|
||||
},
|
||||
{
|
||||
"ID": "499cfa784579b58bba713daa0983d705",
|
||||
"PrefabID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"PrefabObjectID": "a7238dc54c597268e760c8be6167a5f3",
|
||||
"ParentID": "f23b32ac4b8839a306a1b394222824af"
|
||||
"TypeName": "FlaxEngine.Camera",
|
||||
"ParentID": "08ed03be4d537814ba01edb88f6801e1",
|
||||
"Name": "Camera",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 0.0,
|
||||
"Y": 22.328903198242189,
|
||||
"Z": 0.0
|
||||
}
|
||||
},
|
||||
"Near": 1.0
|
||||
},
|
||||
{
|
||||
"ID": "fbaa6db24f0a2a9db36bc6a043fc2572",
|
||||
"TypeName": "FlaxEngine.CapsuleCollider",
|
||||
"ParentID": "4ef1f38b4569142b55b0ff935525d47a",
|
||||
"Name": "CapsuleCollider",
|
||||
"Transform": {
|
||||
"Orientation": {
|
||||
"X": 0.0,
|
||||
"Y": 0.0,
|
||||
"Z": 0.7071068286895752,
|
||||
"W": 0.7071068286895752
|
||||
}
|
||||
},
|
||||
"Material": "ffe0e84c49607480f67a3994a7fe11a8",
|
||||
"Radius": 16.0,
|
||||
"Height": 52.0
|
||||
},
|
||||
{
|
||||
"ID": "b5d566374477944e69bdc2b86249883b",
|
||||
@@ -96,8 +137,8 @@
|
||||
},
|
||||
"V": {
|
||||
"Size": {
|
||||
"X": 829.0,
|
||||
"Y": 450.0
|
||||
"X": 1439.0,
|
||||
"Y": 818.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -117,13 +158,13 @@
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 0.0,
|
||||
"Y": 370.0,
|
||||
"Y": 738.0,
|
||||
"Z": 0.0
|
||||
}
|
||||
},
|
||||
"Control": "FlaxEngine.GUI.Label",
|
||||
"Data": {
|
||||
"Text": "FPS: -2147483648\nrFPS: -2147483648\nCon: 0ms\nDirectX11\nGC memory: 19.46077MB",
|
||||
"Text": "FPS: 690\nrFPS: 690\nCon: NaNms\nDirectX11\nGC memory: 6.903736MB",
|
||||
"TextColor": {
|
||||
"R": 1.0,
|
||||
"G": 1.0,
|
||||
@@ -169,9 +210,9 @@
|
||||
},
|
||||
"Offsets": {
|
||||
"Left": 0.0,
|
||||
"Right": 151.999985,
|
||||
"Right": 143.0,
|
||||
"Top": -80.0,
|
||||
"Bottom": 78.0
|
||||
"Bottom": 80.0
|
||||
},
|
||||
"Scale": {
|
||||
"X": 1.0,
|
||||
@@ -202,6 +243,11 @@
|
||||
"TypeName": "FlaxEngine.PostFxVolume",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "PostFxVolume",
|
||||
"Size": {
|
||||
"X": 10.0,
|
||||
"Y": 10.0,
|
||||
"Z": 10.0
|
||||
},
|
||||
"IsBounded": false,
|
||||
"Settings": {
|
||||
"AO": {
|
||||
@@ -243,258 +289,6 @@
|
||||
"PostFxMaterials": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "259d16004c99e362cfe0e982b8f9f71c",
|
||||
"TypeName": "FlaxEngine.StaticModel",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "Cube 4",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 119.64962768554688,
|
||||
"Y": 254.10433959960938,
|
||||
"Z": -2643.116455078125
|
||||
},
|
||||
"Orientation": {
|
||||
"X": 0.0,
|
||||
"Y": 0.7071068286895752,
|
||||
"Z": 0.0,
|
||||
"W": 0.7071068286895752
|
||||
},
|
||||
"Scale": {
|
||||
"X": 1.0,
|
||||
"Y": 5.0,
|
||||
"Z": 14.0
|
||||
}
|
||||
},
|
||||
"Model": "b43f0f8f4aaba3f3156896a5a22ba493",
|
||||
"LightmapIndex": 5,
|
||||
"LightmapArea": {
|
||||
"Location": {
|
||||
"X": 0.01171875,
|
||||
"Y": 0.01171875
|
||||
},
|
||||
"Size": {
|
||||
"X": 0.65234375,
|
||||
"Y": 0.65234375
|
||||
}
|
||||
},
|
||||
"Buffer": {
|
||||
"Entries": [
|
||||
{
|
||||
"Material": "076df2f449a475bd96087ebb03e0cfc6",
|
||||
"ShadowsMode": 3,
|
||||
"Visible": true,
|
||||
"ReceiveDecals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "4f93b4474218dfaf2607dbb6d09f7072",
|
||||
"TypeName": "FlaxEngine.StaticModel",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "Cube 2",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -582.435791015625,
|
||||
"Y": 254.10433959960938,
|
||||
"Z": -3340.948486328125
|
||||
},
|
||||
"Scale": {
|
||||
"X": 1.0,
|
||||
"Y": 5.0,
|
||||
"Z": 15.0
|
||||
}
|
||||
},
|
||||
"Model": "b43f0f8f4aaba3f3156896a5a22ba493",
|
||||
"LightmapIndex": 3,
|
||||
"LightmapArea": {
|
||||
"Location": {
|
||||
"X": 0.01171875,
|
||||
"Y": 0.01171875
|
||||
},
|
||||
"Size": {
|
||||
"X": 0.68359375,
|
||||
"Y": 0.68359375
|
||||
}
|
||||
},
|
||||
"Buffer": {
|
||||
"Entries": [
|
||||
{
|
||||
"Material": "076df2f449a475bd96087ebb03e0cfc6",
|
||||
"ShadowsMode": 3,
|
||||
"Visible": true,
|
||||
"ReceiveDecals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "38eca39f435a0c158b2cacab8798575f",
|
||||
"TypeName": "FlaxEngine.StaticModel",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "Cube 3",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 69.94135284423828,
|
||||
"Y": 254.10433959960938,
|
||||
"Z": -4042.036376953125
|
||||
},
|
||||
"Orientation": {
|
||||
"X": 0.0,
|
||||
"Y": 0.7071068286895752,
|
||||
"Z": 0.0,
|
||||
"W": 0.7071068286895752
|
||||
},
|
||||
"Scale": {
|
||||
"X": 1.0,
|
||||
"Y": 5.0,
|
||||
"Z": 14.0
|
||||
}
|
||||
},
|
||||
"Model": "b43f0f8f4aaba3f3156896a5a22ba493",
|
||||
"LightmapIndex": 6,
|
||||
"LightmapArea": {
|
||||
"Location": {
|
||||
"X": 0.01171875,
|
||||
"Y": 0.01171875
|
||||
},
|
||||
"Size": {
|
||||
"X": 0.65234375,
|
||||
"Y": 0.65234375
|
||||
}
|
||||
},
|
||||
"Buffer": {
|
||||
"Entries": [
|
||||
{
|
||||
"Material": "076df2f449a475bd96087ebb03e0cfc6",
|
||||
"ShadowsMode": 3,
|
||||
"Visible": true,
|
||||
"ReceiveDecals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "dddcbf304302b935dd9ddcb6c840d864",
|
||||
"TypeName": "FlaxEngine.StaticModel",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "Cube 1",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 817.3660278320313,
|
||||
"Y": 254.10433959960938,
|
||||
"Z": -3340.948486328125
|
||||
},
|
||||
"Scale": {
|
||||
"X": 1.0,
|
||||
"Y": 5.0,
|
||||
"Z": 15.0
|
||||
}
|
||||
},
|
||||
"Model": "b43f0f8f4aaba3f3156896a5a22ba493",
|
||||
"LightmapIndex": 4,
|
||||
"LightmapArea": {
|
||||
"Location": {
|
||||
"X": 0.01171875,
|
||||
"Y": 0.01171875
|
||||
},
|
||||
"Size": {
|
||||
"X": 0.68359375,
|
||||
"Y": 0.68359375
|
||||
}
|
||||
},
|
||||
"Buffer": {
|
||||
"Entries": [
|
||||
{
|
||||
"Material": "076df2f449a475bd96087ebb03e0cfc6",
|
||||
"ShadowsMode": 3,
|
||||
"Visible": true,
|
||||
"ReceiveDecals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "c54c9d0d41afa7e3856004b6b4a97cc5",
|
||||
"TypeName": "FlaxEngine.StaticModel",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "Cube 0",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 116.16995239257813,
|
||||
"Y": 552.7622680664063,
|
||||
"Z": -3340.948486328125
|
||||
},
|
||||
"Scale": {
|
||||
"X": 15.0,
|
||||
"Y": 1.0,
|
||||
"Z": 15.0
|
||||
}
|
||||
},
|
||||
"Model": "b43f0f8f4aaba3f3156896a5a22ba493",
|
||||
"LightmapIndex": 2,
|
||||
"LightmapArea": {
|
||||
"Location": {
|
||||
"X": 0.01171875,
|
||||
"Y": 0.01171875
|
||||
},
|
||||
"Size": {
|
||||
"X": 0.9765625,
|
||||
"Y": 0.9765625
|
||||
}
|
||||
},
|
||||
"Buffer": {
|
||||
"Entries": [
|
||||
{
|
||||
"Material": "076df2f449a475bd96087ebb03e0cfc6",
|
||||
"ShadowsMode": 3,
|
||||
"Visible": true,
|
||||
"ReceiveDecals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "9e81b97a460a3ebdbfa23c8cc9c73814",
|
||||
"TypeName": "FlaxEngine.StaticModel",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "Cube",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 116.16995239257813,
|
||||
"Y": -44.25721740722656,
|
||||
"Z": -3340.948486328125
|
||||
},
|
||||
"Scale": {
|
||||
"X": 15.0,
|
||||
"Y": 1.0,
|
||||
"Z": 15.0
|
||||
}
|
||||
},
|
||||
"Model": "b43f0f8f4aaba3f3156896a5a22ba493",
|
||||
"LightmapIndex": 1,
|
||||
"LightmapArea": {
|
||||
"Location": {
|
||||
"X": 0.01171875,
|
||||
"Y": 0.01171875
|
||||
},
|
||||
"Size": {
|
||||
"X": 0.9765625,
|
||||
"Y": 0.9765625
|
||||
}
|
||||
},
|
||||
"Buffer": {
|
||||
"Entries": [
|
||||
{
|
||||
"Material": "076df2f449a475bd96087ebb03e0cfc6",
|
||||
"ShadowsMode": 3,
|
||||
"Visible": true,
|
||||
"ReceiveDecals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"TypeName": "FlaxEngine.EmptyActor",
|
||||
@@ -506,16 +300,17 @@
|
||||
"TypeName": "FlaxEngine.StaticModel",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"Name": "aerowalk",
|
||||
"Model": "92721f9047ed88a11a2a0f9d91318d2a",
|
||||
"ScaleInLightmap": 1.7000000476837159,
|
||||
"Model": "3352c3ba40fd1de3860007ac3c82faa1",
|
||||
"LightmapIndex": 0,
|
||||
"LightmapArea": {
|
||||
"Location": {
|
||||
"X": 0.01171875,
|
||||
"Y": 0.01171875
|
||||
"X": 0.0068359375,
|
||||
"Y": 0.0068359375
|
||||
},
|
||||
"Size": {
|
||||
"X": 0.9765625,
|
||||
"Y": 0.9765625
|
||||
"X": 0.6962890625,
|
||||
"Y": 0.6962890625
|
||||
}
|
||||
},
|
||||
"Buffer": {
|
||||
@@ -534,7 +329,7 @@
|
||||
"TypeName": "FlaxEngine.MeshCollider",
|
||||
"ParentID": "50ad596341c9673049a24e93f42bbc6a",
|
||||
"Name": "MeshCollider",
|
||||
"CollisionData": "e6ed18254269f695ebd6eb8962eee3b6"
|
||||
"CollisionData": "2c230bc4495f2154b1f46dbdfbbc708f"
|
||||
},
|
||||
{
|
||||
"ID": "0ce8e2d243fbab91b628dfb267db7d67",
|
||||
@@ -976,6 +771,38 @@
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "004cb5b14e0557f74e5c0e9931c91f35",
|
||||
"TypeName": "FlaxEngine.DirectionalLight",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"IsActive": false,
|
||||
"Name": "DirectionalLight",
|
||||
"Transform": {
|
||||
"Orientation": {
|
||||
"X": 0.7071068286895752,
|
||||
"Y": 0.0,
|
||||
"Z": 0.0,
|
||||
"W": 0.7071068286895752
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "59dbfb614285609352de3cbae7523cc2",
|
||||
"TypeName": "FlaxEngine.SkyLight",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"IsActive": false,
|
||||
"Name": "SkyLight",
|
||||
"Brightness": 0.3999999761581421,
|
||||
"BakedProbe": "201afa52451b91c9c05937a87db55343",
|
||||
"Mode": 0
|
||||
},
|
||||
{
|
||||
"ID": "23e180374748c02bb99b2cad33d22e7d",
|
||||
"TypeName": "FlaxEngine.Sky",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"IsActive": false,
|
||||
"Name": "Sky"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
"MaxPackageSizeMB": 1024,
|
||||
"ContentKey": 0,
|
||||
"ForDistribution": false,
|
||||
"SkipPackaging": true,
|
||||
"SkipPackaging": false,
|
||||
"ShadersNoOptimize": false,
|
||||
"ShadersGenerateDebugData": false,
|
||||
"Presets": [
|
||||
@@ -15,8 +15,8 @@
|
||||
"Name": "Development",
|
||||
"Targets": [
|
||||
{
|
||||
"Name": "Windows 64bit",
|
||||
"Output": "Output\\Win64",
|
||||
"Name": "Win64",
|
||||
"Output": "Output\\Windows",
|
||||
"Platform": 2,
|
||||
"Mode": 1
|
||||
}
|
||||
@@ -26,10 +26,10 @@
|
||||
"Name": "Release",
|
||||
"Targets": [
|
||||
{
|
||||
"Name": "Windows 64bit",
|
||||
"Output": "Output\\Win64",
|
||||
"Name": "Win64",
|
||||
"Output": "Output\\WindowsRelease",
|
||||
"Platform": 2,
|
||||
"Mode": 1
|
||||
"Mode": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
58
Content/Settings/PhysicsSettings.json
Normal file
58
Content/Settings/PhysicsSettings.json
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"ID": "4bd8a4cc460399b5f1975fbe0a668e3f",
|
||||
"TypeName": "FlaxEditor.Content.Settings.PhysicsSettings",
|
||||
"EngineBuild": 6216,
|
||||
"Data": {
|
||||
"DefaultGravity": {
|
||||
"X": 0.0,
|
||||
"Y": -9810.0,
|
||||
"Z": 0.0
|
||||
},
|
||||
"QueriesHitTriggers": true,
|
||||
"TriangleMeshTriangleMinAreaThreshold": 5.0,
|
||||
"BounceThresholdVelocity": 200.0,
|
||||
"FrictionCombineMode": 0,
|
||||
"RestitutionCombineMode": 0,
|
||||
"DisableCCD": false,
|
||||
"EnableAdaptiveForce": false,
|
||||
"MaxDeltaTime": 0.1,
|
||||
"EnableSubstepping": false,
|
||||
"SubstepDeltaTime": 0.008333334,
|
||||
"MaxSubsteps": 5,
|
||||
"SupportCookingAtRuntime": false,
|
||||
"LayerMasks": [
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295,
|
||||
4294967295
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
"TypeName": "FlaxEditor.Content.Settings.TimeSettings",
|
||||
"EngineBuild": 6216,
|
||||
"Data": {
|
||||
"UpdateFPS": 0.0,
|
||||
"UpdateFPS": 120.0,
|
||||
"PhysicsFPS": 60.0,
|
||||
"DrawFPS": 0.0,
|
||||
"DrawFPS": 120.0,
|
||||
"TimeScale": 1.0,
|
||||
"MaxUpdateDeltaTime": 0.1
|
||||
}
|
||||
|
||||
Binary file not shown.
BIN
Content/aerowalk/DefaultMaterial.flax
Normal file
BIN
Content/aerowalk/DefaultMaterial.flax
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/aerowalk/dev dev_128_gray.flax
Normal file
BIN
Content/aerowalk/dev dev_128_gray.flax
Normal file
Binary file not shown.
BIN
Content/aerowalk_collision2.flax
Normal file
BIN
Content/aerowalk_collision2.flax
Normal file
Binary file not shown.
BIN
Content/aerowalk_uv/common clip.flax
Normal file
BIN
Content/aerowalk_uv/common clip.flax
Normal file
Binary file not shown.
20
GoakeFlax.code-workspace
Normal file
20
GoakeFlax.code-workspace
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"settings": {
|
||||
"typescript.tsc.autoDetect": "off",
|
||||
"npm.autoDetect": "off",
|
||||
"gulp.autoDetect": "off",
|
||||
"jake.autoDetect": "off",
|
||||
"grunt.autoDetect": "off",
|
||||
"omnisharp.defaultLaunchSolution": "GoakeFlax.sln"
|
||||
},
|
||||
"folders": [
|
||||
{
|
||||
"name": "GoakeFlax",
|
||||
"path": "."
|
||||
},
|
||||
{
|
||||
"name": "Flax",
|
||||
"path": "C:\\dev\\Flax\\FlaxEngine"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -238,6 +238,9 @@ namespace Cabrito
|
||||
|
||||
Debug.Logger.LogHandler.SendLog += OnSendLog;
|
||||
Debug.Logger.LogHandler.SendExceptionLog += OnSendExceptionLog;
|
||||
|
||||
Console.OnOpen += () => { Screen.CursorVisible = true; Screen.CursorLock = CursorLockMode.None; };
|
||||
Console.OnClose += () => { Screen.CursorVisible = false; Screen.CursorLock = CursorLockMode.Locked; };
|
||||
}
|
||||
|
||||
private void OnSendLog(LogType level, string msg, FlaxEngine.Object obj, string stackTrace)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using FlaxEngine;
|
||||
using Cabrito;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
@@ -17,9 +18,6 @@ namespace Game
|
||||
private float inputV;
|
||||
|
||||
private InputEvent onExit = new InputEvent("Exit");
|
||||
private InputEvent onDebug1 = new InputEvent("DebugTrigger1");
|
||||
private InputEvent onDebug2 = new InputEvent("DebugTrigger2");
|
||||
private InputEvent onDebug3 = new InputEvent("DebugTrigger3");
|
||||
|
||||
public override void OnAwake()
|
||||
{
|
||||
@@ -30,36 +28,6 @@ namespace Game
|
||||
if (Console.IsSafeToQuit)
|
||||
Engine.RequestExit();
|
||||
};
|
||||
onDebug1.Triggered += () =>
|
||||
{
|
||||
int quality = (int)Graphics.ShadowsQuality;
|
||||
quality++;
|
||||
if (quality >= (int)Quality.MAX)
|
||||
quality = 0;
|
||||
|
||||
Graphics.ShadowsQuality = (Quality)quality;
|
||||
Debug.Log("ShadowsQuality: " + Graphics.ShadowsQuality.ToString());
|
||||
};
|
||||
onDebug2.Triggered += () =>
|
||||
{
|
||||
int quality = (int)Graphics.ShadowMapsQuality;
|
||||
quality++;
|
||||
if (quality >= (int)Quality.MAX)
|
||||
quality = 0;
|
||||
|
||||
Graphics.ShadowMapsQuality = (Quality)quality;
|
||||
Debug.Log("ShadowMapsQuality: " + Graphics.ShadowMapsQuality.ToString());
|
||||
};
|
||||
onDebug3.Triggered += () =>
|
||||
{
|
||||
var box = Scene.AddChild<BoxBrush>();
|
||||
box.Position = Actor.Position;
|
||||
//Scene.BuildCSG(1000);
|
||||
|
||||
var actor = Actor;
|
||||
|
||||
Console.Print("howdy");
|
||||
};
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
@@ -67,9 +35,6 @@ namespace Game
|
||||
base.OnDestroy();
|
||||
|
||||
onExit.Dispose();
|
||||
onDebug1.Dispose();
|
||||
onDebug2.Dispose();
|
||||
onDebug3.Dispose();
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
@@ -77,22 +42,14 @@ namespace Game
|
||||
var initialEulerAngles = Actor.Orientation.EulerAngles;
|
||||
_pitch = initialEulerAngles.X;
|
||||
_yaw = initialEulerAngles.Y;
|
||||
|
||||
Console.OnOpen += () => { Screen.CursorVisible = true; Screen.CursorLock = CursorLockMode.None; };
|
||||
Console.OnClose += () => { Screen.CursorVisible = false; Screen.CursorLock = CursorLockMode.Locked; };
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnUpdate()
|
||||
{
|
||||
if (Console.IsOpen)
|
||||
return;
|
||||
|
||||
var camTrans = Actor.Transform;
|
||||
|
||||
xAxis = Input.GetAxis("Mouse X");
|
||||
yAxis = Input.GetAxis("Mouse Y");
|
||||
xAxis = InputManager.GetAxis("Mouse X");
|
||||
yAxis = InputManager.GetAxis("Mouse Y");
|
||||
|
||||
if (xAxis != 0.0f || yAxis != 0.0f)
|
||||
{
|
||||
@@ -102,14 +59,60 @@ namespace Game
|
||||
camTrans.Orientation = Quaternion.Euler(_pitch, _yaw, 0);
|
||||
}
|
||||
|
||||
inputH = Input.GetAxis("Horizontal");
|
||||
inputV = Input.GetAxis("Vertical");
|
||||
inputH = InputManager.GetAxis("Horizontal");
|
||||
inputV = InputManager.GetAxis("Vertical");
|
||||
var move = new Vector3(inputH, 0.0f, inputV);
|
||||
|
||||
if (!move.IsZero)
|
||||
{
|
||||
move.Normalize();
|
||||
move = camTrans.TransformDirection(move);
|
||||
camTrans.Translation += move * MoveSpeed * Time.UnscaledDeltaTime;
|
||||
move = camTrans.TransformDirection(move) * MoveSpeed;
|
||||
|
||||
{
|
||||
Vector3 delta = move * Time.UnscaledDeltaTime;
|
||||
float movementLeft = delta.Length;
|
||||
|
||||
// TODO: check multiple times in case we get stuck in walls
|
||||
|
||||
float sphereRadius = 10.0f; // TODO: use collider radius
|
||||
RayCastHit[] hitInfos;
|
||||
float moveDist = delta.Length;
|
||||
Physics.SphereCastAll(Actor.Transform.Translation, sphereRadius, move.Normalized, out hitInfos, moveDist);
|
||||
|
||||
//bool nohit = true;
|
||||
float hitDistance = moveDist;
|
||||
Vector3 hitNormal = move.Normalized;
|
||||
foreach (RayCastHit hitInfo in hitInfos)
|
||||
{
|
||||
if (hitInfo.Collider.Parent == Parent)
|
||||
continue;
|
||||
|
||||
if (hitInfo.Distance < hitDistance)
|
||||
{
|
||||
hitDistance = hitInfo.Distance;
|
||||
hitNormal = hitInfo.Normal;
|
||||
}
|
||||
//nohit = false;
|
||||
//break;
|
||||
}
|
||||
|
||||
if (hitDistance != moveDist)
|
||||
{
|
||||
//camTrans.Translation = Vector3.Lerp(Actor.Transform.Translation, camTrans.Translation, hitDistance);
|
||||
|
||||
//projected = normal * dot(direction, normal);
|
||||
//direction = direction - projected
|
||||
|
||||
|
||||
//camTrans.Translation += hitNormal * (moveDist - hitDistance); // correct?
|
||||
//camTrans.Translation = hitNormal * (move * hitNormal); // correct?
|
||||
//camTrans.Translation = Actor.Transform.Translation;
|
||||
delta += -Vector3.Dot(delta, hitNormal) * hitNormal; // correct?
|
||||
}
|
||||
|
||||
camTrans.Translation += delta;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Actor.Transform = camTrans;
|
||||
|
||||
11
Source/Game/CustomCharacterController.cs
Normal file
11
Source/Game/CustomCharacterController.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public class CustomCharacterController : CharacterController
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
30
Source/Game/InputManager.cs
Normal file
30
Source/Game/InputManager.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using FlaxEngine;
|
||||
using Cabrito;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public static class InputManager
|
||||
{
|
||||
public static bool GetAction(string name)
|
||||
{
|
||||
if (Console.IsOpen)
|
||||
return false;
|
||||
return Input.GetAction(name);
|
||||
}
|
||||
|
||||
public static float GetAxis(string name)
|
||||
{
|
||||
if (Console.IsOpen)
|
||||
return 0.0f;
|
||||
return Input.GetAxis(name);
|
||||
}
|
||||
|
||||
public static float GetAxisRaw(string name)
|
||||
{
|
||||
if (Console.IsOpen)
|
||||
return 0.0f;
|
||||
return Input.GetAxisRaw(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
116
Source/Game/PlayerMovement.cs
Normal file
116
Source/Game/PlayerMovement.cs
Normal file
@@ -0,0 +1,116 @@
|
||||
using FlaxEngine;
|
||||
using Cabrito;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public class PlayerMovement : Script
|
||||
{
|
||||
[Limit(0, 9000), Tooltip("Base Movement speed")]
|
||||
public float MoveSpeed { get; set; } = 320;
|
||||
|
||||
private float viewPitch;
|
||||
private float viewYaw;
|
||||
private float viewRoll;
|
||||
|
||||
private InputEvent onExit = new InputEvent("Exit");
|
||||
|
||||
Actor rootActor;
|
||||
public override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
/*
|
||||
onExit.Triggered += () =>
|
||||
{
|
||||
if (Console.IsSafeToQuit)
|
||||
Engine.RequestExit();
|
||||
};
|
||||
|
||||
rootActor = Actor.GetChild(0);*/
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
/*base.OnDestroy();
|
||||
|
||||
onExit.Dispose();*/
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
/*var initialEulerAngles = Actor.Orientation.EulerAngles;
|
||||
viewPitch = initialEulerAngles.X;
|
||||
viewYaw = initialEulerAngles.Y;
|
||||
viewRoll = initialEulerAngles.Z;*/
|
||||
}
|
||||
|
||||
Vector3 wishVelocity = new Vector3(0);
|
||||
public override void OnFixedUpdate()
|
||||
{
|
||||
/*if (Console.IsOpen)
|
||||
return;
|
||||
|
||||
var camera = rootActor.GetChild<Camera>();
|
||||
var camTrans = camera.Transform;
|
||||
var rootTrans = rootActor.Transform;
|
||||
|
||||
float inputH = InputManager.GetAxis("Horizontal");
|
||||
float inputV = InputManager.GetAxis("Vertical");
|
||||
var move = new Vector3(inputH, 0.0f, inputV);
|
||||
|
||||
var rigidBody = Actor.As<RigidBody>();
|
||||
|
||||
|
||||
Vector3 accel = new Vector3(0);
|
||||
|
||||
if (!move.IsZero)
|
||||
{
|
||||
move.Normalize();
|
||||
|
||||
move = rootTrans.TransformDirection(move) * 10;
|
||||
|
||||
accel = move;
|
||||
|
||||
var groundVelocity = rigidBody.LinearVelocity;
|
||||
groundVelocity.Y = 0;
|
||||
|
||||
if (groundVelocity.Length > MoveSpeed)
|
||||
accel = new Vector3(0);
|
||||
//wishVelocity = move;
|
||||
}
|
||||
//else if (!wishVelocity.IsZero)
|
||||
// wishVelocity = new Vector3(0);
|
||||
|
||||
//rigidBody.Position += wishVelocity * Time.DeltaTime;
|
||||
//rigidBody.AddForce(accel, ForceMode.Acceleration);
|
||||
rigidBody.LinearVelocity += accel;
|
||||
//rigidBody.LinearVelocity = wishVelocity;
|
||||
//rigidBody.LinearVelocity /= Time.DeltaTime;
|
||||
*/
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
/*float xAxis = InputManager.GetAxis("Mouse X");
|
||||
float yAxis = InputManager.GetAxis("Mouse Y");
|
||||
if (xAxis != 0.0f || yAxis != 0.0f)
|
||||
{
|
||||
var camera = rootActor.GetChild<Camera>();
|
||||
var camTrans = camera.Transform;
|
||||
var rootTrans = rootActor.Transform;
|
||||
|
||||
viewPitch += yAxis;
|
||||
viewYaw += xAxis;
|
||||
|
||||
viewPitch = Mathf.Clamp(viewPitch, -90.0f, 90.0f);
|
||||
|
||||
camTrans.Orientation = Quaternion.Euler(viewPitch, viewYaw, viewRoll);
|
||||
rootTrans.Orientation = Quaternion.Euler(0, viewYaw, 0);
|
||||
|
||||
camera.Transform = camTrans;
|
||||
rootActor.Transform = rootTrans;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
29
Source/Game/TestScript.cs
Normal file
29
Source/Game/TestScript.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public class TestScript : Script
|
||||
{
|
||||
public override void OnStart()
|
||||
{
|
||||
// Here you can add code that needs to be called when script is created, just before the first game update
|
||||
}
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
// Here you can add code that needs to be called when script is enabled (eg. register for events)
|
||||
}
|
||||
|
||||
public override void OnDisable()
|
||||
{
|
||||
// Here you can add code that needs to be called when script is disabled (eg. unregister from events)
|
||||
}
|
||||
|
||||
public override void OnUpdate()
|
||||
{
|
||||
// Here you can add code that needs to be called every frame
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user