WIP
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,3 +11,5 @@ Source/**/*.Gen.cs
|
||||
*.suo
|
||||
.vs/*
|
||||
Output/*
|
||||
*/SceneData/*/Lightmaps/*
|
||||
*/SceneData/*/SkyLights/*
|
||||
|
||||
BIN
Assets/Fonts/CascadiaMono-Bold.ttf
Normal file
BIN
Assets/Fonts/CascadiaMono-Bold.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/CascadiaMono-ExtraLight.ttf
Normal file
BIN
Assets/Fonts/CascadiaMono-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/CascadiaMono-Light.ttf
Normal file
BIN
Assets/Fonts/CascadiaMono-Light.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/CascadiaMono-Regular.ttf
Normal file
BIN
Assets/Fonts/CascadiaMono-Regular.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/CascadiaMono-SemiBold.ttf
Normal file
BIN
Assets/Fonts/CascadiaMono-SemiBold.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/CascadiaMono-SemiLight.ttf
Normal file
BIN
Assets/Fonts/CascadiaMono-SemiLight.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/Oxanium-Bold.ttf
Normal file
BIN
Assets/Fonts/Oxanium-Bold.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/Oxanium-ExtraBold.ttf
Normal file
BIN
Assets/Fonts/Oxanium-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/Oxanium-ExtraLight.ttf
Normal file
BIN
Assets/Fonts/Oxanium-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/Oxanium-Light.ttf
Normal file
BIN
Assets/Fonts/Oxanium-Light.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/Oxanium-Medium.ttf
Normal file
BIN
Assets/Fonts/Oxanium-Medium.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/Oxanium-Regular.ttf
Normal file
BIN
Assets/Fonts/Oxanium-Regular.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/Oxanium-SemiBold.ttf
Normal file
BIN
Assets/Fonts/Oxanium-SemiBold.ttf
Normal file
Binary file not shown.
93
Assets/Fonts/Oxanium_License.txt
Normal file
93
Assets/Fonts/Oxanium_License.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
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.
|
||||
BIN
Assets/Fonts/SairaCondensed-Black.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-Black.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/SairaCondensed-Bold.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-Bold.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/SairaCondensed-ExtraBold.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/SairaCondensed-ExtraLight.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/SairaCondensed-Light.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-Light.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/SairaCondensed-Medium.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-Medium.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/SairaCondensed-Regular.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-Regular.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/SairaCondensed-SemiBold.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-SemiBold.ttf
Normal file
Binary file not shown.
BIN
Assets/Fonts/SairaCondensed-Thin.ttf
Normal file
BIN
Assets/Fonts/SairaCondensed-Thin.ttf
Normal file
Binary file not shown.
93
Assets/Fonts/SairaCondensed_License.txt
Normal file
93
Assets/Fonts/SairaCondensed_License.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
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.
|
||||
9
Assets/aerowalk.mtl
Normal file
9
Assets/aerowalk.mtl
Normal file
@@ -0,0 +1,9 @@
|
||||
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
Normal file
11634
Assets/aerowalk.obj
Normal file
File diff suppressed because it is too large
Load Diff
65
Content/Common/CommonScenePrefab.prefab
Normal file
65
Content/Common/CommonScenePrefab.prefab
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"ID": "74681ad5400d069f5faeafaf9de27a73",
|
||||
"TypeName": "FlaxEngine.Prefab",
|
||||
"EngineBuild": 6215,
|
||||
"Data": [
|
||||
{
|
||||
"ID": "16c934314cd7f81e22561ba4391c6872",
|
||||
"TypeName": "FlaxEngine.PostFxVolume",
|
||||
"Name": "CommonScenePrefab",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -97.18594360351563,
|
||||
"Y": 0.0,
|
||||
"Z": -216.60525512695313
|
||||
}
|
||||
},
|
||||
"Size": {
|
||||
"X": 100.0,
|
||||
"Y": 100.0,
|
||||
"Z": 100.0
|
||||
},
|
||||
"IsBounded": false,
|
||||
"Settings": {
|
||||
"AO": {
|
||||
"Enabled": false
|
||||
},
|
||||
"Bloom": {
|
||||
"Enabled": false
|
||||
},
|
||||
"ToneMapping": {},
|
||||
"ColorGrading": {},
|
||||
"EyeAdaptation": {
|
||||
"OverrideFlags": 1,
|
||||
"Mode": 0
|
||||
},
|
||||
"CameraArtifacts": {
|
||||
"OverrideFlags": 41,
|
||||
"VignetteIntensity": 0.0,
|
||||
"GrainAmount": 0.0,
|
||||
"GrainSpeed": 0.010000050067901612
|
||||
},
|
||||
"LensFlares": {
|
||||
"Intensity": 0.0,
|
||||
"Ghosts": 0,
|
||||
"HaloWidth": 0.0
|
||||
},
|
||||
"DepthOfField": {
|
||||
"OverrideFlags": 129,
|
||||
"BokehEnabled": false
|
||||
},
|
||||
"MotionBlur": {
|
||||
"OverrideFlags": 1,
|
||||
"Enabled": false
|
||||
},
|
||||
"SSR": {},
|
||||
"AA": {
|
||||
"OverrideFlags": 1,
|
||||
"Mode": 3,
|
||||
"TAA_JitterSpread": 0.10000000149011612
|
||||
},
|
||||
"PostFxMaterials": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
34
Content/Common/ConsoleCanvasPrefab.prefab
Normal file
34
Content/Common/ConsoleCanvasPrefab.prefab
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"ID": "c11d68fa43cb5b17c51f6c8c3ec51f08",
|
||||
"TypeName": "FlaxEngine.Prefab",
|
||||
"EngineBuild": 6216,
|
||||
"Data": [
|
||||
{
|
||||
"ID": "46375015427f291423cbfea902e110bc",
|
||||
"TypeName": "FlaxEngine.UICanvas",
|
||||
"ParentID": "00000000000000000000000000000000",
|
||||
"Name": "ConsoleCanvas",
|
||||
"V": {
|
||||
"Order": -9999999,
|
||||
"Size": {
|
||||
"X": 1465.0,
|
||||
"Y": 891.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "ae020482484dfe1d95be308832d58e56",
|
||||
"TypeName": "MyCore.ConsoleScript",
|
||||
"ParentID": "46375015427f291423cbfea902e110bc",
|
||||
"V": {
|
||||
"consoleFont": "ab96b25a49461d9f4f819484cf5c8213",
|
||||
"backgroundColor": {
|
||||
"R": 0.0,
|
||||
"G": 0.0,
|
||||
"B": 0.0,
|
||||
"A": 0.8039216
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
141
Content/Common/DefaultHudPrefab.prefab
Normal file
141
Content/Common/DefaultHudPrefab.prefab
Normal file
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"ID": "6a855e524d1809b93599278b910921b3",
|
||||
"TypeName": "FlaxEngine.Prefab",
|
||||
"EngineBuild": 6216,
|
||||
"Data": [
|
||||
{
|
||||
"ID": "d902f53245e68d652dfe928706dd976f",
|
||||
"TypeName": "FlaxEngine.UICanvas",
|
||||
"Name": "DefaultHudPrefab",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -35.90293884277344,
|
||||
"Y": 0.0,
|
||||
"Z": -89.94500732421875
|
||||
},
|
||||
"Orientation": {
|
||||
"X": 1.0,
|
||||
"Y": 4.371138828673793e-8,
|
||||
"Z": 4.371138828673793e-8,
|
||||
"W": 1.910685465164705e-15
|
||||
}
|
||||
},
|
||||
"V": {
|
||||
"Size": {
|
||||
"X": 1458.0,
|
||||
"Y": 828.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "2e2a7beb4ad7ce04b9c776948c457ddc",
|
||||
"TypeName": "MyCore.ConsoleScript",
|
||||
"ParentID": "d902f53245e68d652dfe928706dd976f",
|
||||
"V": {
|
||||
"consoleFont": "ab96b25a49461d9f4f819484cf5c8213",
|
||||
"backgroundColor": {
|
||||
"R": 0.0,
|
||||
"G": 0.0,
|
||||
"B": 0.0,
|
||||
"A": 0.8055556
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "5658891f4b25b2573beed4912c8fb409",
|
||||
"TypeName": "FlaxEngine.UIControl",
|
||||
"ParentID": "d902f53245e68d652dfe928706dd976f",
|
||||
"Name": "FPSUIControl",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 0.0,
|
||||
"Y": 26.0,
|
||||
"Z": 0.0
|
||||
}
|
||||
},
|
||||
"Control": "FlaxEngine.GUI.Label",
|
||||
"Data": {
|
||||
"Text": "fps?",
|
||||
"TextColor": {
|
||||
"R": 1.0,
|
||||
"G": 1.0,
|
||||
"B": 1.0,
|
||||
"A": 1.0
|
||||
},
|
||||
"TextColorHighlighted": {
|
||||
"R": 1.0,
|
||||
"G": 1.0,
|
||||
"B": 1.0,
|
||||
"A": 1.0
|
||||
},
|
||||
"HorizontalAlignment": 1,
|
||||
"VerticalAlignment": 1,
|
||||
"Wrapping": 0,
|
||||
"Font": {
|
||||
"Font": "4508d98f4aa1f0bd59362b81d47e38f4",
|
||||
"Size": 10
|
||||
},
|
||||
"Margin": {
|
||||
"Left": 0.0,
|
||||
"Right": 0.0,
|
||||
"Top": 0.0,
|
||||
"Bottom": 0.0
|
||||
},
|
||||
"ClipText": false,
|
||||
"AutoWidth": true,
|
||||
"AutoHeight": true,
|
||||
"AutoFitText": false,
|
||||
"AutoFitTextRange": {
|
||||
"X": 0.1,
|
||||
"Y": 100.0
|
||||
},
|
||||
"ClipChildren": true,
|
||||
"CullChildren": true,
|
||||
"AnchorMin": {
|
||||
"X": 0.0,
|
||||
"Y": 0.0
|
||||
},
|
||||
"AnchorMax": {
|
||||
"X": 0.0,
|
||||
"Y": 0.0
|
||||
},
|
||||
"Offsets": {
|
||||
"Left": 0.0,
|
||||
"Right": 25.0,
|
||||
"Top": 26.0,
|
||||
"Bottom": 16.0
|
||||
},
|
||||
"Scale": {
|
||||
"X": 1.0,
|
||||
"Y": 1.0
|
||||
},
|
||||
"Pivot": {
|
||||
"X": 0.5,
|
||||
"Y": 0.5
|
||||
},
|
||||
"Shear": {
|
||||
"X": 0.0,
|
||||
"Y": 0.0
|
||||
},
|
||||
"Rotation": 0.0,
|
||||
"BackgroundColor": {
|
||||
"R": 0.0,
|
||||
"G": 0.0,
|
||||
"B": 0.0,
|
||||
"A": 0.0
|
||||
},
|
||||
"Enabled": true,
|
||||
"Visible": true,
|
||||
"AutoFocus": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "7ae6fbc24d3c0133ec0b8a8f3cabeee5",
|
||||
"TypeName": "MyCore.FpsScript",
|
||||
"ParentID": "5658891f4b25b2573beed4912c8fb409",
|
||||
"V": {
|
||||
"control": "5658891f4b25b2573beed4912c8fb409"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
42
Content/Common/PlayerPrefab.prefab
Normal file
42
Content/Common/PlayerPrefab.prefab
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"ID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"TypeName": "FlaxEngine.Prefab",
|
||||
"EngineBuild": 6215,
|
||||
"Data": [
|
||||
{
|
||||
"ID": "87a5405b4a75c2e317c0e99c737ed20c",
|
||||
"TypeName": "FlaxEngine.RigidBody",
|
||||
"ParentID": "00000000000000000000000000000000",
|
||||
"Name": "Player",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 0.0,
|
||||
"Y": 113.28770446777344,
|
||||
"Z": -85.91201782226563
|
||||
}
|
||||
},
|
||||
"Mass": 520.6746826171875,
|
||||
"IsKinematic": true,
|
||||
"EnableGravity": false
|
||||
},
|
||||
{
|
||||
"ID": "18b5d58241ae50d4c3fdf2942cbcefda",
|
||||
"TypeName": "Game.CameraMovement",
|
||||
"ParentID": "87a5405b4a75c2e317c0e99c737ed20c",
|
||||
"V": {}
|
||||
},
|
||||
{
|
||||
"ID": "8e4e59954c3348a327b01fbe314b2a43",
|
||||
"TypeName": "FlaxEngine.SphereCollider",
|
||||
"ParentID": "87a5405b4a75c2e317c0e99c737ed20c",
|
||||
"Name": "SphereCollider",
|
||||
"Radius": 10.0
|
||||
},
|
||||
{
|
||||
"ID": "a7238dc54c597268e760c8be6167a5f3",
|
||||
"TypeName": "FlaxEngine.Camera",
|
||||
"ParentID": "87a5405b4a75c2e317c0e99c737ed20c",
|
||||
"Name": "Camera"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
Content/Fonts/CascadiaMono-Bold.flax
Normal file
BIN
Content/Fonts/CascadiaMono-Bold.flax
Normal file
Binary file not shown.
BIN
Content/Fonts/CascadiaMono-Regular.flax
Normal file
BIN
Content/Fonts/CascadiaMono-Regular.flax
Normal file
Binary file not shown.
BIN
Content/Materials/Material 0.flax
Normal file
BIN
Content/Materials/Material 0.flax
Normal file
Binary file not shown.
BIN
Content/Materials/dev/dev_128.flax
Normal file
BIN
Content/Materials/dev/dev_128.flax
Normal file
Binary file not shown.
BIN
Content/Materials/sky.flax
Normal file
BIN
Content/Materials/sky.flax
Normal file
Binary file not shown.
BIN
Content/SceneData/MainScene/CSG_Collision.flax
Normal file
BIN
Content/SceneData/MainScene/CSG_Collision.flax
Normal file
Binary file not shown.
BIN
Content/SceneData/MainScene/CSG_Data.flax
Normal file
BIN
Content/SceneData/MainScene/CSG_Data.flax
Normal file
Binary file not shown.
BIN
Content/SceneData/MainScene/CSG_Mesh.flax
Normal file
BIN
Content/SceneData/MainScene/CSG_Mesh.flax
Normal file
Binary file not shown.
986
Content/Scenes/MainScene.scene
Normal file
986
Content/Scenes/MainScene.scene
Normal file
@@ -0,0 +1,986 @@
|
||||
{
|
||||
"ID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"TypeName": "FlaxEngine.SceneAsset",
|
||||
"EngineBuild": 6216,
|
||||
"Data": [
|
||||
{
|
||||
"ID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"TypeName": "FlaxEngine.Scene",
|
||||
"LightmapSettings": {
|
||||
"IndirectLightingIntensity": 1.0,
|
||||
"GlobalObjectsScale": 1.0,
|
||||
"ChartsPadding": 3,
|
||||
"AtlasSize": 1024,
|
||||
"BounceCount": 1,
|
||||
"CompressLightmaps": true,
|
||||
"UseGeometryWithNoMaterials": true,
|
||||
"Quality": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "a092422548695989fdb8eeb8bc89eacb",
|
||||
"TypeName": "FlaxEngine.UICanvas",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "ConsoleUICanvas",
|
||||
"Transform": {
|
||||
"Orientation": {
|
||||
"X": 1.0,
|
||||
"Y": 4.371138828673793e-8,
|
||||
"Z": 4.371138828673793e-8,
|
||||
"W": 1.910685465164705e-15
|
||||
}
|
||||
},
|
||||
"V": {
|
||||
"Order": -999999999,
|
||||
"Size": {
|
||||
"X": 1456.0,
|
||||
"Y": 810.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "b165319d47550ff115d2e1ae9d9f95e5",
|
||||
"TypeName": "Cabrito.ConsoleScript",
|
||||
"ParentID": "a092422548695989fdb8eeb8bc89eacb",
|
||||
"V": {
|
||||
"ConsoleFont": "43f32bec443158643f53699f07b2e09c",
|
||||
"BackgroundColor": {
|
||||
"R": 0.0,
|
||||
"G": 0.0,
|
||||
"B": 0.0,
|
||||
"A": 1.0
|
||||
},
|
||||
"LineSpacing": 1.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "f23b32ac4b8839a306a1b394222824af",
|
||||
"PrefabID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"PrefabObjectID": "87a5405b4a75c2e317c0e99c737ed20c",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "PlayerPrefab",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -1112.9998779296876,
|
||||
"Y": 92.40696716308594,
|
||||
"Z": 1358.571044921875
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "15f3be084b5f8de5ef4332b0aeb2a994",
|
||||
"PrefabID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"PrefabObjectID": "18b5d58241ae50d4c3fdf2942cbcefda",
|
||||
"ParentID": "f23b32ac4b8839a306a1b394222824af",
|
||||
"V": {}
|
||||
},
|
||||
{
|
||||
"ID": "6f99f0cf4ccef10c2ba29db205c069e4",
|
||||
"PrefabID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"PrefabObjectID": "8e4e59954c3348a327b01fbe314b2a43",
|
||||
"ParentID": "f23b32ac4b8839a306a1b394222824af"
|
||||
},
|
||||
{
|
||||
"ID": "499cfa784579b58bba713daa0983d705",
|
||||
"PrefabID": "90b9ee4242e9a8cf833da58208265e95",
|
||||
"PrefabObjectID": "a7238dc54c597268e760c8be6167a5f3",
|
||||
"ParentID": "f23b32ac4b8839a306a1b394222824af"
|
||||
},
|
||||
{
|
||||
"ID": "b5d566374477944e69bdc2b86249883b",
|
||||
"TypeName": "FlaxEngine.UICanvas",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "DefaultHudPrefab",
|
||||
"Transform": {
|
||||
"Orientation": {
|
||||
"X": 1.0,
|
||||
"Y": 4.371138828673793e-8,
|
||||
"Z": 4.371138828673793e-8,
|
||||
"W": 1.910685465164705e-15
|
||||
}
|
||||
},
|
||||
"V": {
|
||||
"Size": {
|
||||
"X": 1456.0,
|
||||
"Y": 810.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "f8ac0e55467d78743a7405a1d5720557",
|
||||
"TypeName": "Cabrito.FpsScript",
|
||||
"ParentID": "b5d566374477944e69bdc2b86249883b",
|
||||
"V": {
|
||||
"control": "17f6e00f48bbc783fc655a8be5bf12d2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "17f6e00f48bbc783fc655a8be5bf12d2",
|
||||
"TypeName": "FlaxEngine.UIControl",
|
||||
"ParentID": "b5d566374477944e69bdc2b86249883b",
|
||||
"Name": "FPSUIControl",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 0.0,
|
||||
"Y": 730.0,
|
||||
"Z": 0.0
|
||||
}
|
||||
},
|
||||
"Control": "FlaxEngine.GUI.Label",
|
||||
"Data": {
|
||||
"Text": "FPS: 120\nrFPS: 120\nCon: NaNms\nDirectX11\nGC memory: 9.143608MB",
|
||||
"TextColor": {
|
||||
"R": 1.0,
|
||||
"G": 1.0,
|
||||
"B": 1.0,
|
||||
"A": 1.0
|
||||
},
|
||||
"TextColorHighlighted": {
|
||||
"R": 1.0,
|
||||
"G": 1.0,
|
||||
"B": 1.0,
|
||||
"A": 1.0
|
||||
},
|
||||
"HorizontalAlignment": 1,
|
||||
"VerticalAlignment": 1,
|
||||
"Wrapping": 0,
|
||||
"Font": {
|
||||
"Font": "4508d98f4aa1f0bd59362b81d47e38f4",
|
||||
"Size": 10
|
||||
},
|
||||
"Margin": {
|
||||
"Left": 0.0,
|
||||
"Right": 0.0,
|
||||
"Top": 0.0,
|
||||
"Bottom": 0.0
|
||||
},
|
||||
"ClipText": false,
|
||||
"AutoWidth": true,
|
||||
"AutoHeight": true,
|
||||
"AutoFitText": false,
|
||||
"AutoFitTextRange": {
|
||||
"X": 0.1,
|
||||
"Y": 100.0
|
||||
},
|
||||
"ClipChildren": true,
|
||||
"CullChildren": true,
|
||||
"AnchorMin": {
|
||||
"X": 0.0,
|
||||
"Y": 1.0
|
||||
},
|
||||
"AnchorMax": {
|
||||
"X": 0.0,
|
||||
"Y": 1.0
|
||||
},
|
||||
"Offsets": {
|
||||
"Left": 0.0,
|
||||
"Right": 143.0,
|
||||
"Top": -80.0,
|
||||
"Bottom": 80.0
|
||||
},
|
||||
"Scale": {
|
||||
"X": 1.0,
|
||||
"Y": 1.0
|
||||
},
|
||||
"Pivot": {
|
||||
"X": 0.5,
|
||||
"Y": 0.5
|
||||
},
|
||||
"Shear": {
|
||||
"X": 0.0,
|
||||
"Y": 0.0
|
||||
},
|
||||
"Rotation": 0.0,
|
||||
"BackgroundColor": {
|
||||
"R": 0.0,
|
||||
"G": 0.0,
|
||||
"B": 0.0,
|
||||
"A": 0.0
|
||||
},
|
||||
"Enabled": true,
|
||||
"Visible": true,
|
||||
"AutoFocus": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "b5f2c9fa45788e293d971a994eb5a48d",
|
||||
"TypeName": "FlaxEngine.PostFxVolume",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "PostFxVolume",
|
||||
"IsBounded": false,
|
||||
"Settings": {
|
||||
"AO": {
|
||||
"OverrideFlags": 1,
|
||||
"Enabled": false
|
||||
},
|
||||
"Bloom": {
|
||||
"OverrideFlags": 1,
|
||||
"Enabled": false
|
||||
},
|
||||
"ToneMapping": {
|
||||
"OverrideFlags": 4,
|
||||
"Mode": 0
|
||||
},
|
||||
"ColorGrading": {},
|
||||
"EyeAdaptation": {
|
||||
"OverrideFlags": 1,
|
||||
"Mode": 0
|
||||
},
|
||||
"CameraArtifacts": {
|
||||
"OverrideFlags": 1,
|
||||
"VignetteIntensity": 0.0,
|
||||
"GrainAmount": 0.0
|
||||
},
|
||||
"LensFlares": {},
|
||||
"DepthOfField": {},
|
||||
"MotionBlur": {
|
||||
"OverrideFlags": 1,
|
||||
"Enabled": false
|
||||
},
|
||||
"SSR": {
|
||||
"OverrideFlags": 1,
|
||||
"Intensity": 0.0
|
||||
},
|
||||
"AA": {
|
||||
"OverrideFlags": 1,
|
||||
"Mode": 0
|
||||
},
|
||||
"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",
|
||||
"ParentID": "0733cc9b40d3d05366be64bbd9b59e21",
|
||||
"Name": "Aerowalk_Level"
|
||||
},
|
||||
{
|
||||
"ID": "50ad596341c9673049a24e93f42bbc6a",
|
||||
"TypeName": "FlaxEngine.StaticModel",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"Name": "aerowalk",
|
||||
"Model": "92721f9047ed88a11a2a0f9d91318d2a",
|
||||
"LightmapIndex": 0,
|
||||
"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": "bd701dda47ff2d1c02b9cb993563cbd3",
|
||||
"TypeName": "FlaxEngine.MeshCollider",
|
||||
"ParentID": "50ad596341c9673049a24e93f42bbc6a",
|
||||
"Name": "MeshCollider",
|
||||
"CollisionData": "e6ed18254269f695ebd6eb8962eee3b6"
|
||||
},
|
||||
{
|
||||
"ID": "0ce8e2d243fbab91b628dfb267db7d67",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -387.930419921875,
|
||||
"Y": 454.2125549316406,
|
||||
"Z": -82.55476379394531
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "f7ded1e14f07a1cd69a36281e2b4f3c0",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 58.50630187988281,
|
||||
"Y": 24.0389404296875,
|
||||
"Z": -339.129638671875
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "ed0d4fe14e117a1aa08adb901f92d921",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 414.9161376953125,
|
||||
"Y": 259.7470397949219,
|
||||
"Z": 5.528617858886719
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "89bd3f334aa2f24cff5929a24b14694b",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 11",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -139.7169952392578,
|
||||
"Y": 284.8927001953125,
|
||||
"Z": 5.528617858886719
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "39f47d7a49aacce8412b8fa32238b930",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 799.4921875,
|
||||
"Y": 254.8575439453125,
|
||||
"Z": -637.1461181640625
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "bf8d9ec348a48ebe3f4116a01b4b8d68",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 20.788848876953126,
|
||||
"Y": 213.3086395263672,
|
||||
"Z": -454.76007080078127
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "73763d8245e22b7282e954a8f100ae9f",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 7",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 223.45620727539063,
|
||||
"Y": 213.3086395263672,
|
||||
"Z": -454.76007080078127
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "b36f412b4fc40301e6d7638a42cfa7ad",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 8",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 461.1920166015625,
|
||||
"Y": 213.3086395263672,
|
||||
"Z": -454.76007080078127
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "61694a304bfd82d9643b47a42e45072b",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 9",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 651.9166259765625,
|
||||
"Y": 279.74932861328127,
|
||||
"Z": -454.76007080078127
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "18197acc42eb0830038ac68bfe9ae8fb",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 10",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 622.8150634765625,
|
||||
"Y": 304.2939147949219,
|
||||
"Z": -35.359535217285159
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "1dae734c4ea1de10161a7898bf5e9f66",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 426.25115966796877,
|
||||
"Y": 498.1340026855469,
|
||||
"Z": 9.742958068847657
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "ec5da699440d4b3a95303096a4282842",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 2",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 761.80224609375,
|
||||
"Y": 498.1340026855469,
|
||||
"Z": -137.70721435546876
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "18806dc94904d939dc79b1bb065004fa",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 3",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 761.80224609375,
|
||||
"Y": 498.1340026855469,
|
||||
"Z": -416.62799072265627
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "5b8d205d4ec6e7dd12dfc399a54f3875",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 4",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 424.5787353515625,
|
||||
"Y": 489.3695373535156,
|
||||
"Z": -416.62799072265627
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "6993b1b54b4f3fd05255ac88fdd65006",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 5",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 253.13937377929688,
|
||||
"Y": 533.873046875,
|
||||
"Z": -416.62799072265627
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "b82fee5d4cc1691d996ba7b7b384f84d",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 6",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 51.16327667236328,
|
||||
"Y": 533.873046875,
|
||||
"Z": -416.62799072265627
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "8e99253a4a7a84aad58b7eb5ae8fb864",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -164.90817260742188,
|
||||
"Y": 396.1681823730469,
|
||||
"Z": 347.22509765625
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "943371144750abdeb0a96f872e42f91c",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 0",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 123.68722534179688,
|
||||
"Y": 503.66351318359377,
|
||||
"Z": 555.0986328125
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "a14e27b84c8cfff9a66d8ebcdf031ec1",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 1",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": 123.68722534179688,
|
||||
"Y": 493.44677734375,
|
||||
"Z": 322.75146484375
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "0e1cc7e14a6874111b38d68e862022af",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -377.1890869140625,
|
||||
"Y": 295.10723876953127,
|
||||
"Z": -306.16180419921877
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
},
|
||||
{
|
||||
"ID": "d6901d524466f77d4397acbd969f9eed",
|
||||
"TypeName": "FlaxEngine.PointLight",
|
||||
"ParentID": "971ab456449e86b64b3f94b2752ba12a",
|
||||
"IsActive": false,
|
||||
"Name": "PointLight 0",
|
||||
"Transform": {
|
||||
"Translation": {
|
||||
"X": -562.8017578125,
|
||||
"Y": 293.4427490234375,
|
||||
"Z": -306.16180419921877
|
||||
}
|
||||
},
|
||||
"Brightness": 3.940000057220459,
|
||||
"ShadowsDistance": 800.0,
|
||||
"ShadowsFadeDistance": 0.0,
|
||||
"ShadowsDepthBias": 0.019999999552965165,
|
||||
"ShadowsNormalOffsetScale": 100.0,
|
||||
"Radius": 429.5,
|
||||
"FallOffExponent": 2.0
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
Content/Textures/dev/dev_128_gray.flax
Normal file
BIN
Content/Textures/dev/dev_128_gray.flax
Normal file
Binary file not shown.
BIN
Content/Textures/dev/dev_128_lightgray.flax
Normal file
BIN
Content/Textures/dev/dev_128_lightgray.flax
Normal file
Binary file not shown.
BIN
Content/Textures/dev/dev_128_mat_norm.flax
Normal file
BIN
Content/Textures/dev/dev_128_mat_norm.flax
Normal file
Binary file not shown.
BIN
Content/Textures/dev/dev_128_mat_orm.flax
Normal file
BIN
Content/Textures/dev/dev_128_mat_orm.flax
Normal file
Binary file not shown.
BIN
Content/Textures/sky/sky.flax
Normal file
BIN
Content/Textures/sky/sky.flax
Normal file
Binary file not shown.
BIN
Content/aerowalk.flax
Normal file
BIN
Content/aerowalk.flax
Normal file
Binary file not shown.
BIN
Content/aerowalk/common WTF.flax
Normal file
BIN
Content/aerowalk/common WTF.flax
Normal file
Binary file not shown.
BIN
Content/aerowalk/common clip.flax
Normal file
BIN
Content/aerowalk/common clip.flax
Normal file
Binary file not shown.
BIN
Content/aerowalk_collision.flax
Normal file
BIN
Content/aerowalk_collision.flax
Normal file
Binary file not shown.
11
Plugins/Cabrito/.gitignore
vendored
Normal file
11
Plugins/Cabrito/.gitignore
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
Cabrito.sln
|
||||
|
||||
Binaries/*
|
||||
Cache/*
|
||||
Logs/*
|
||||
packages/*
|
||||
|
||||
Source/**/*.csproj
|
||||
Source/**/*.Gen.cs
|
||||
*.csproj.user
|
||||
*.suo
|
||||
26
Plugins/Cabrito/Cabrito.flaxproj
Normal file
26
Plugins/Cabrito/Cabrito.flaxproj
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Name": "Cabrito",
|
||||
"Version": "1.0",
|
||||
"Company": "My Company",
|
||||
"Copyright": "",
|
||||
"GameTarget": "CabritoTarget",
|
||||
"EditorTarget": "CabritoEditorTarget",
|
||||
"References": [
|
||||
{
|
||||
"Name": "$(EnginePath)/Flax.flaxproj"
|
||||
}
|
||||
],
|
||||
"DefaultSceneSpawn": {
|
||||
"Position": {
|
||||
"X": 0.0,
|
||||
"Y": 0.0,
|
||||
"Z": 0.0
|
||||
},
|
||||
"Direction": {
|
||||
"X": 0.0,
|
||||
"Y": 0.0,
|
||||
"Z": 1.0
|
||||
}
|
||||
},
|
||||
"MinEngineVersion": "0.0.6194"
|
||||
}
|
||||
BIN
Plugins/Cabrito/Source/CabritoEditorTarget.Build.cs
Normal file
BIN
Plugins/Cabrito/Source/CabritoEditorTarget.Build.cs
Normal file
Binary file not shown.
13
Plugins/Cabrito/Source/CabritoTarget.Build.cs
Normal file
13
Plugins/Cabrito/Source/CabritoTarget.Build.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Flax.Build;
|
||||
|
||||
public class CabritoTarget : GameProjectTarget
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
// Reference the modules for game
|
||||
Modules.Add("Cabrito");
|
||||
}
|
||||
}
|
||||
@@ -1,74 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Cabrito
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class ConsoleVariableAttribute : Attribute
|
||||
{
|
||||
public string name;
|
||||
|
||||
public ConsoleVariableAttribute(string name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class ConsoleCommandAttribute : Attribute
|
||||
{
|
||||
public string name;
|
||||
|
||||
public ConsoleCommandAttribute(string name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
internal struct ConsoleVariable
|
||||
{
|
||||
private FieldInfo field;
|
||||
|
||||
public ConsoleVariable(FieldInfo field)
|
||||
{
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public string GetValueString()
|
||||
{
|
||||
if (field.FieldType != typeof(string))
|
||||
throw new Exception("cvar is not type of string");
|
||||
|
||||
return (string)field.GetValue(null);
|
||||
}
|
||||
|
||||
public void SetValue(string value)
|
||||
{
|
||||
var type = field.FieldType;
|
||||
if (type == typeof(string))
|
||||
field.SetValue(null, value);
|
||||
else
|
||||
throw new Exception("Unsupported type for SetValue: " + type.Name);
|
||||
}
|
||||
}
|
||||
|
||||
internal struct ConsoleCommand
|
||||
{
|
||||
private MethodInfo method;
|
||||
|
||||
public ConsoleCommand(MethodInfo method)
|
||||
{
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
public void Invoke(params object[] parameters)
|
||||
{
|
||||
method.Invoke(null, parameters);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Console
|
||||
{
|
||||
private static ConsoleScriptBase scriptInstance = null;
|
||||
@@ -86,7 +23,7 @@ namespace Cabrito
|
||||
|
||||
// Called when Console is closed.
|
||||
public static Action OnClose;
|
||||
|
||||
|
||||
public static bool ShowExecutedLines = true;
|
||||
public static string LinePrefix { get; internal set; } = "]";
|
||||
|
||||
@@ -121,37 +58,97 @@ namespace Cabrito
|
||||
|
||||
foreach (var type in assembly.GetTypes())
|
||||
{
|
||||
foreach (var method in type.GetMethods())
|
||||
Dictionary<string, ConsoleCommand> cmdParsed = new Dictionary<string, ConsoleCommand>();
|
||||
Dictionary<string, List<MethodInfo>> cmdMethods = new Dictionary<string, List<MethodInfo>>();
|
||||
|
||||
foreach (MethodInfo method in type.GetMethods())
|
||||
{
|
||||
if (!method.IsStatic)
|
||||
continue;
|
||||
|
||||
Attribute[] attributes = Attribute.GetCustomAttributes(method);
|
||||
|
||||
foreach (var attr in attributes)
|
||||
foreach (Attribute attr in attributes)
|
||||
{
|
||||
if (attr is ConsoleCommandAttribute cmdAttribute)
|
||||
{
|
||||
//Console.Print("found cmd '" + cmdAttribute.name + "' bound to field '" + method.Name + "'");
|
||||
var cmd = new ConsoleCommand(method);
|
||||
consoleCommands.Add(cmdAttribute.name.ToLower(), cmd);
|
||||
|
||||
// Defer constructing the command until we have parsed all the methods for it in this assembly.
|
||||
|
||||
List<MethodInfo> methods;
|
||||
if (!cmdMethods.TryGetValue(cmdAttribute.name, out methods))
|
||||
{
|
||||
methods = new List<MethodInfo>();
|
||||
cmdMethods.Add(cmdAttribute.name, methods);
|
||||
}
|
||||
methods.Add(method);
|
||||
|
||||
ConsoleCommand cmd = new ConsoleCommand(cmdAttribute.name, null);
|
||||
if (!cmdParsed.ContainsKey(cmdAttribute.name))
|
||||
cmdParsed.Add(cmdAttribute.name, cmd);
|
||||
foreach (var alias in cmdAttribute.aliases)
|
||||
{
|
||||
if (!cmdParsed.ContainsKey(alias))
|
||||
cmdParsed.Add(alias, cmd);
|
||||
|
||||
List<MethodInfo> aliasMethods;
|
||||
if (!cmdMethods.TryGetValue(alias, out aliasMethods))
|
||||
{
|
||||
aliasMethods = new List<MethodInfo>();
|
||||
cmdMethods.Add(alias, aliasMethods);
|
||||
}
|
||||
aliasMethods.Add(method);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var field in type.GetFields())
|
||||
|
||||
foreach (var kv in cmdParsed)
|
||||
{
|
||||
var methods = cmdMethods[kv.Key];
|
||||
var definition = kv.Value;
|
||||
|
||||
ConsoleCommand cmd = new ConsoleCommand(definition.name, methods.ToArray());
|
||||
consoleCommands.Add(kv.Key, cmd);
|
||||
}
|
||||
|
||||
foreach (FieldInfo field in type.GetFields())
|
||||
{
|
||||
if (!field.IsStatic)
|
||||
continue;
|
||||
|
||||
Attribute[] attributes = Attribute.GetCustomAttributes(field);
|
||||
|
||||
foreach (var attr in attributes)
|
||||
foreach (Attribute attr in attributes)
|
||||
{
|
||||
if (attr is ConsoleVariableAttribute cvarAttribute)
|
||||
{
|
||||
//Console.Print("found cvar '" + cvarAttribute.name + "' bound to field '" + field.Name + "'");
|
||||
var cvar = new ConsoleVariable(field);
|
||||
consoleVariables.Add(cvarAttribute.name.ToLower(), cvar);
|
||||
consoleVariables.Add(cvarAttribute.name, new ConsoleVariable(cvarAttribute.name, cvarAttribute.flags, field));
|
||||
foreach (var alias in cvarAttribute.aliases)
|
||||
consoleVariables.Add(alias, new ConsoleVariable(cvarAttribute.name, cvarAttribute.flags | ConsoleFlags.NoSerialize, field));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (PropertyInfo prop in type.GetProperties())
|
||||
{
|
||||
MethodInfo getter = prop.GetGetMethod();
|
||||
MethodInfo setter = prop.GetSetMethod();
|
||||
if (getter == null || setter == null || !getter.IsStatic || !setter.IsStatic)
|
||||
continue;
|
||||
|
||||
Attribute[] attributes = Attribute.GetCustomAttributes(prop);
|
||||
|
||||
foreach (Attribute attr in attributes)
|
||||
{
|
||||
if (attr is ConsoleVariableAttribute cvarAttribute)
|
||||
{
|
||||
//Console.Print("found cvar '" + cvarAttribute.name + "' bound to field '" + field.Name + "'");
|
||||
consoleVariables.Add(cvarAttribute.name, new ConsoleVariable(cvarAttribute.name, cvarAttribute.flags, getter, setter));
|
||||
foreach (var alias in cvarAttribute.aliases)
|
||||
consoleVariables.Add(alias, new ConsoleVariable(cvarAttribute.name, cvarAttribute.flags | ConsoleFlags.NoSerialize, getter, setter));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,16 +252,21 @@ namespace Cabrito
|
||||
|
||||
string[] strs = str.Split(' ');
|
||||
string execute = strs[0];
|
||||
string executeLower = execute.ToLowerInvariant();
|
||||
string value = strs.Length > 1 ? str.Substring(execute.Length + 1) : null;
|
||||
|
||||
//Console.PrintDebug("Executed '" + execute + "' with params: '" + value + "'");
|
||||
|
||||
if (consoleCommands.TryGetValue(execute, out ConsoleCommand cmd))
|
||||
if (consoleCommands.TryGetValue(executeLower, out ConsoleCommand cmd))
|
||||
{
|
||||
cmd.Invoke();
|
||||
string[] values = strs.Skip(1).ToArray();
|
||||
if (values.Length > 0)
|
||||
cmd.Invoke(values);
|
||||
else
|
||||
cmd.Invoke();
|
||||
//Console.Print("Command bound to '" + execute + "' is '" + cmd.method.Name + "'");
|
||||
}
|
||||
else if (consoleVariables.TryGetValue(execute, out ConsoleVariable cvar))
|
||||
else if (consoleVariables.TryGetValue(executeLower, out ConsoleVariable cvar))
|
||||
{
|
||||
if (value != null)
|
||||
cvar.SetValue(value);
|
||||
|
||||
59
Source/Game/Cabrito/Console/ConsoleAttributes.cs
Normal file
59
Source/Game/Cabrito/Console/ConsoleAttributes.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cabrito
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public abstract class ConsoleBaseAttribute : Attribute
|
||||
{
|
||||
internal string name;
|
||||
|
||||
// Additional aliases for this command, these should only be used with user interaction.
|
||||
// Commands such as 'cvarlist' should not list these in order to avoid clutter.
|
||||
internal string[] aliases = new string[0];
|
||||
|
||||
public ConsoleFlags flags { get; private set; }
|
||||
|
||||
public ConsoleBaseAttribute(string name)
|
||||
{
|
||||
this.name = name.ToLowerInvariant();
|
||||
}
|
||||
|
||||
public ConsoleBaseAttribute(params string[] names)
|
||||
{
|
||||
this.name = names[0].ToLowerInvariant();
|
||||
aliases = new List<string>(names).Skip(1).Select(x => x.ToLowerInvariant()).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class ConsoleVariableAttribute : ConsoleBaseAttribute
|
||||
{
|
||||
public ConsoleVariableAttribute(string name) : base(name)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class ConsoleCommandAttribute : ConsoleBaseAttribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Registers a command to Console system.
|
||||
/// </summary>
|
||||
/// <param name="name">Name used for calling this command.</param>
|
||||
public ConsoleCommandAttribute(string name) : base(name)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers a command to Console system.
|
||||
/// </summary>
|
||||
/// <param name="names">Names used for calling this command. First name is the main name for this command, rest of the names are aliases.</param>
|
||||
public ConsoleCommandAttribute(params string[] names) : base(names)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Source/Game/Cabrito/Console/ConsoleCommand.cs
Normal file
80
Source/Game/Cabrito/Console/ConsoleCommand.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cabrito
|
||||
{
|
||||
internal struct ConsoleCommand
|
||||
{
|
||||
public string name { get; private set; }
|
||||
|
||||
private MethodInfo[] methods;
|
||||
|
||||
public ConsoleCommand(string name, MethodInfo[] method)
|
||||
{
|
||||
this.name = name;
|
||||
this.methods = method;
|
||||
}
|
||||
|
||||
public void Invoke()
|
||||
{
|
||||
foreach (var method in methods)
|
||||
{
|
||||
var methodParameters = method.GetParameters();
|
||||
if (methodParameters.Length != 0)
|
||||
continue;
|
||||
|
||||
method.Invoke(null, null);
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Exception("Unexpected number of parameters.");
|
||||
}
|
||||
|
||||
public void Invoke(string[] parameters)
|
||||
{
|
||||
MethodInfo match = null;
|
||||
foreach (var method in methods)
|
||||
{
|
||||
var methodParameters = method.GetParameters();
|
||||
if (methodParameters.Length == 1 && methodParameters[0].ParameterType == typeof(string[]))
|
||||
{
|
||||
match = method;
|
||||
continue;
|
||||
}
|
||||
else if (methodParameters.Length != parameters.Length)
|
||||
continue;
|
||||
|
||||
// TODO: try to parse string parameters to needed types first,
|
||||
// may require finding the exact match first instead of first matching one.
|
||||
for (int i = 0; i < methodParameters.Length; i++)
|
||||
//if (methodParameters[i].ParameterType != parameters[i].GetType())
|
||||
if (methodParameters[i].ParameterType != typeof(string))
|
||||
continue;
|
||||
|
||||
if (match != null)
|
||||
{
|
||||
// Prefer exact number of parameters over string[] match
|
||||
if (methodParameters.Length != parameters.Length)
|
||||
continue;
|
||||
}
|
||||
match = method;
|
||||
}
|
||||
|
||||
if (match != null)
|
||||
{
|
||||
if (match.GetParameters().Length == 1 && match.GetParameters()[0].ParameterType == typeof(string[]))
|
||||
match.Invoke(null, new object[] { parameters });
|
||||
else
|
||||
match.Invoke(null, parameters);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
throw new Exception("Unexpected number of parameters.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -459,6 +459,7 @@ namespace Cabrito
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
public class ConsoleContentTextBox_Old : ConsoleTextBoxBase
|
||||
{
|
||||
[HideInEditor]
|
||||
@@ -562,4 +563,5 @@ namespace Cabrito
|
||||
return inputBox.OnCharInput(c);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -56,8 +56,14 @@ namespace Cabrito
|
||||
}
|
||||
else if (key == KeyboardKeys.Return)
|
||||
{
|
||||
Console.Execute(Text);
|
||||
Clear();
|
||||
try
|
||||
{
|
||||
Console.Execute(Text);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (key == KeyboardKeys.ArrowUp || key == KeyboardKeys.ArrowDown)
|
||||
|
||||
@@ -160,6 +160,7 @@ namespace Cabrito
|
||||
Console.RegisterConsoleScript(this);
|
||||
RefreshLayout();
|
||||
|
||||
#if false
|
||||
//for (int i = 0; i < 10; i++)
|
||||
{
|
||||
string[] teststr = {
|
||||
@@ -219,6 +220,23 @@ namespace Cabrito
|
||||
foreach (var l in teststr)
|
||||
Console.Print(l);
|
||||
}
|
||||
#endif
|
||||
/*FlaxEditor.Editor.Options.OptionsChanged += (FlaxEditor.Options.EditorOptions options) =>
|
||||
{
|
||||
|
||||
};*/
|
||||
Debug.Logger.LogHandler.SendLog += OnSendLog;
|
||||
Debug.Logger.LogHandler.SendExceptionLog += OnSendExceptionLog;
|
||||
}
|
||||
|
||||
private void OnSendLog(LogType level, string msg, FlaxEngine.Object obj, string stackTrace)
|
||||
{
|
||||
Console.Print("[DEBUGs] " + msg);
|
||||
}
|
||||
|
||||
private void OnSendExceptionLog(Exception exception, FlaxEngine.Object obj)
|
||||
{
|
||||
Console.Print("[EXCEP] " + exception.Message);
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
@@ -229,6 +247,9 @@ namespace Cabrito
|
||||
consoleBox?.Dispose();
|
||||
backgroundImage?.DisposeChildren();
|
||||
backgroundImage?.Dispose();
|
||||
|
||||
Debug.Logger.LogHandler.SendLog -= OnSendLog;
|
||||
Debug.Logger.LogHandler.SendExceptionLog -= OnSendExceptionLog;
|
||||
}
|
||||
|
||||
public void RefreshLayout()
|
||||
|
||||
@@ -63,8 +63,8 @@ namespace Cabrito
|
||||
[HideInEditor]
|
||||
public virtual string TextPrefix { get; set; } = "";
|
||||
|
||||
[HideInEditor]
|
||||
public override string Text => _text;
|
||||
//[HideInEditor]
|
||||
//public override string Text => _text;
|
||||
|
||||
public ConsoleTextBoxBase() : base()
|
||||
{
|
||||
|
||||
75
Source/Game/Cabrito/Console/ConsoleVariable.cs
Normal file
75
Source/Game/Cabrito/Console/ConsoleVariable.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cabrito
|
||||
{
|
||||
[Flags]
|
||||
public enum ConsoleFlags
|
||||
{
|
||||
NoSerialize = 1, // Value does not persist
|
||||
|
||||
Alias = NoSerialize,
|
||||
}
|
||||
|
||||
internal struct ConsoleVariable
|
||||
{
|
||||
public string name { get; private set; }
|
||||
public ConsoleFlags flags { get; private set; }
|
||||
|
||||
private FieldInfo field;
|
||||
private MethodInfo getter;
|
||||
private MethodInfo setter;
|
||||
|
||||
public ConsoleVariable(string name, ConsoleFlags flags, FieldInfo field)
|
||||
{
|
||||
this.name = name;
|
||||
this.flags = flags;
|
||||
this.field = field;
|
||||
this.getter = null;
|
||||
this.setter = null;
|
||||
}
|
||||
|
||||
public ConsoleVariable(string name, ConsoleFlags flags, MethodInfo getter, MethodInfo setter)
|
||||
{
|
||||
this.name = name;
|
||||
this.flags = flags;
|
||||
this.field = null;
|
||||
this.getter = getter;
|
||||
this.setter = setter;
|
||||
}
|
||||
|
||||
public string GetValueString()
|
||||
{
|
||||
var type = field != null ? field.FieldType : getter.ReturnType;
|
||||
if (type == typeof(string))
|
||||
{
|
||||
if (field != null)
|
||||
return (string)field.GetValue(null);
|
||||
else if (setter != null)
|
||||
return (string)getter.Invoke(null, null);
|
||||
}
|
||||
else
|
||||
throw new Exception("cvar is not type of string");
|
||||
|
||||
throw new Exception("GetValueString no field or getter specified");
|
||||
}
|
||||
|
||||
public void SetValue(string value)
|
||||
{
|
||||
var type = field != null ? field.FieldType : getter.ReturnType;
|
||||
if (type == typeof(string))
|
||||
{
|
||||
if (field != null)
|
||||
field.SetValue(null, value);
|
||||
else if (setter != null)
|
||||
setter.Invoke(null, new object[] { value });
|
||||
}
|
||||
else
|
||||
throw new Exception("Unsupported type for SetValue: " + type.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
87
Source/Game/Cabrito/FpsScript.cs
Normal file
87
Source/Game/Cabrito/FpsScript.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
|
||||
namespace Cabrito
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
public class FpsScript : Script
|
||||
{
|
||||
public UIControl control;
|
||||
Label label;
|
||||
|
||||
Stopwatch sw;
|
||||
double updateTimeAvg = 0.0;
|
||||
ulong updateTimeCount;
|
||||
const double updateInterval = 0.25;
|
||||
|
||||
Stopwatch sw2;
|
||||
double drawTimeAvg = 0.0;
|
||||
ulong drawTimeCount;
|
||||
const double drawInterval = 0.25;
|
||||
|
||||
string currentRenderer = "Unknown";
|
||||
|
||||
RenderTask t;
|
||||
|
||||
public override void OnAwake()
|
||||
{
|
||||
label = (Label)control.Control;
|
||||
|
||||
sw = Stopwatch.StartNew();
|
||||
|
||||
currentRenderer = GPUDevice.Instance.RendererType.ToString();
|
||||
|
||||
sw2 = Stopwatch.StartNew();
|
||||
if (t == null)
|
||||
{
|
||||
//Destroy(t);
|
||||
t = new RenderTask();
|
||||
t.Render += OnDraw;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
Destroy(t);
|
||||
t = null;
|
||||
}
|
||||
|
||||
double conTime = 0.0;
|
||||
public override void OnUpdate()
|
||||
{
|
||||
updateTimeCount++;
|
||||
double elapsed = sw.Elapsed.TotalSeconds;
|
||||
if (elapsed >= updateInterval)
|
||||
{
|
||||
sw.Restart();
|
||||
updateTimeAvg = elapsed / updateTimeCount;
|
||||
updateTimeCount = 0;
|
||||
|
||||
conTime = ((ConsoleContentTextBox.accumDrawTime / ConsoleContentTextBox.accumDrawTimes) * 1000.0);
|
||||
ConsoleContentTextBox.accumDrawTime = 0.0;
|
||||
ConsoleContentTextBox.accumDrawTimes = 0;
|
||||
}
|
||||
|
||||
((Label)control.Control).Text = "FPS: " + ((int)Math.Round(1.0f / updateTimeAvg)).ToString();
|
||||
label.Text += "\nrFPS: " + ((int)Math.Round(1.0f / drawTimeAvg)).ToString();
|
||||
label.Text += "\nCon: " + conTime.ToString() + "ms";
|
||||
label.Text += "\n" + currentRenderer;
|
||||
label.Text += "\nGC memory: " + (GC.GetTotalMemory(false)/1000000.0f).ToString() + "MB";
|
||||
}
|
||||
|
||||
void OnDraw(RenderTask tt, GPUContext context)
|
||||
{
|
||||
drawTimeCount++;
|
||||
double elapsed = sw2.Elapsed.TotalSeconds;
|
||||
if (elapsed >= drawInterval)
|
||||
{
|
||||
sw2.Restart();
|
||||
drawTimeAvg = elapsed / drawTimeCount;
|
||||
drawTimeCount = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
129
Source/Game/Cabrito/SystemCommands.cs
Normal file
129
Source/Game/Cabrito/SystemCommands.cs
Normal file
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace Cabrito
|
||||
{
|
||||
// Holds Consol§e variables and commands to control engine behaviour and other common
|
||||
public static class SystemCommands
|
||||
{
|
||||
[ConsoleCommand("")]
|
||||
public static void NullCommand()
|
||||
{
|
||||
}
|
||||
|
||||
[ConsoleCommand("quit", "exit")]
|
||||
public static void ExitCommand()
|
||||
{
|
||||
Engine.RequestExit();
|
||||
}
|
||||
|
||||
[ConsoleCommand("echo")]
|
||||
public static void EchoCommand()
|
||||
{
|
||||
Console.Print("nothing");
|
||||
}
|
||||
|
||||
[ConsoleCommand("echo")]
|
||||
public static void EchoCommand(string[] text)
|
||||
{
|
||||
Console.Print(string.Join(" ", text));
|
||||
}
|
||||
|
||||
[ConsoleCommand("debuglog")]
|
||||
public static void DebugLogCommand(string[] text)
|
||||
{
|
||||
Debug.Log(string.Join(" ", text));
|
||||
}
|
||||
|
||||
[ConsoleCommand("debugthrow")]
|
||||
public static void DebugThrowCommand(string[] text)
|
||||
{
|
||||
throw new Exception(string.Join(" ", text));
|
||||
}
|
||||
|
||||
// TODO: this should manually set all postprocessing values to 0 or disabled
|
||||
/*[ConsoleVariable("r_postprocessing")]
|
||||
public static string PostProcessing
|
||||
{
|
||||
get
|
||||
{
|
||||
PostFxVolume postFx = Level.FindActor<PostFxVolume>();
|
||||
if (postFx != null)
|
||||
return postFx.CameraArtifacts.OverrideFlags.ToString();
|
||||
return "";
|
||||
}
|
||||
set
|
||||
{
|
||||
bool valueBoolean = false;
|
||||
if (int.TryParse(value, out int valueInt))
|
||||
valueBoolean = valueInt != 0;
|
||||
else
|
||||
return;
|
||||
|
||||
PostFxVolume postFx = Level.FindActor<PostFxVolume>();
|
||||
if (postFx != null)
|
||||
{
|
||||
var cameraArtifacts = postFx.CameraArtifacts;
|
||||
cameraArtifacts.OverrideFlags = valueBoolean ? CameraArtifactsSettingsOverride.None : CameraArtifactsSettingsOverride.All;
|
||||
postFx.CameraArtifacts = cameraArtifacts;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
[ConsoleVariable("r_vignette")]
|
||||
public static string Vignette
|
||||
{
|
||||
get
|
||||
{
|
||||
PostFxVolume postFx = Level.FindActor<PostFxVolume>();
|
||||
if (postFx != null)
|
||||
return postFx.CameraArtifacts.VignetteIntensity.ToString();
|
||||
return "";
|
||||
}
|
||||
set
|
||||
{
|
||||
if (float.TryParse(value, out float valueFloat))
|
||||
{
|
||||
PostFxVolume postFx = Level.FindActor<PostFxVolume>();
|
||||
if (postFx != null)
|
||||
{
|
||||
valueFloat = Mathf.Clamp(valueFloat, 0.0f, 2.0f);
|
||||
|
||||
var cameraArtifacts = postFx.CameraArtifacts;
|
||||
cameraArtifacts.VignetteIntensity = valueFloat;
|
||||
postFx.CameraArtifacts = cameraArtifacts;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ConsoleVariable("cl_maxfps")]
|
||||
public static string MaxFps
|
||||
{
|
||||
get
|
||||
{
|
||||
return Time.UpdateFPS.ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
if (float.TryParse(value, out float valueFloat))
|
||||
{
|
||||
if (valueFloat <= 0.0f)
|
||||
valueFloat = 0.0f;
|
||||
else
|
||||
valueFloat = Mathf.Clamp(valueFloat, 10f, 99999999999.0f);
|
||||
|
||||
if (Time.UpdateFPS != valueFloat)
|
||||
Time.UpdateFPS = valueFloat;
|
||||
if (Time.DrawFPS != valueFloat)
|
||||
Time.DrawFPS = valueFloat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
109
Source/Game/Q3MapImporter.cs
Normal file
109
Source/Game/Q3MapImporter.cs
Normal file
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FlaxEngine;
|
||||
using System.IO;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
public class MapBrush
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class MapEntity
|
||||
{
|
||||
public Dictionary<string, string> properties = new Dictionary<string, string>();
|
||||
public List<MapEntity> entities = new List<MapEntity>();
|
||||
public List<MapBrush> brushes = new List<MapBrush>();
|
||||
}
|
||||
|
||||
public class Q3MapImporter : Script
|
||||
{
|
||||
string mapPath = @"C:\dev\Goake\maps\aerowalk\aerowalk.map";
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
string[] lines = File.ReadAllLines(mapPath);
|
||||
|
||||
MapEntity rootEntity = new MapEntity();
|
||||
MapEntity currentEntity = rootEntity;
|
||||
|
||||
int level = 0;
|
||||
uint lineNumber = 0;
|
||||
foreach (string lineRaw in lines)
|
||||
{
|
||||
lineNumber++;
|
||||
string line = lineRaw.TrimStart();
|
||||
if (line.StartsWith("//"))
|
||||
continue;
|
||||
|
||||
if (line[0] == '{')
|
||||
{
|
||||
level++;
|
||||
|
||||
if (level == 1)
|
||||
{
|
||||
currentEntity = new MapEntity();
|
||||
rootEntity.entities.Add(currentEntity);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else if (line[0] == '}')
|
||||
{
|
||||
level--;
|
||||
currentEntity = rootEntity;
|
||||
}
|
||||
//if (level < 0 || level > 2)
|
||||
// throw new Exception("Failed to parse .map file: unexpected entity found at line " + lineNumber.ToString());
|
||||
|
||||
if (line[0] == '"')
|
||||
{
|
||||
string[] prop = line.Split('\"');
|
||||
if (prop.Length != 5)
|
||||
throw new Exception("Failed to parse .map file: failed to parse property at line " + lineNumber.ToString());
|
||||
|
||||
string propName = prop[1];
|
||||
string propValue = prop[3];
|
||||
|
||||
if (currentEntity.properties.ContainsKey(propName))
|
||||
throw new Exception("Failed to parse .map file: multiple properties defined for " + propName + " at line " + lineNumber.ToString());
|
||||
currentEntity.properties.Add(propName, propValue);
|
||||
}
|
||||
else if (line[0] == '(')
|
||||
{
|
||||
//"( -16 302 431 ) ( -16 302 361 ) ( -16 321 361 ) dev/dev_128_gray 0 0 0 0.0625 0.0625 0 0 0"
|
||||
string[] bru = line.Split(new char[] { '(', ')' });
|
||||
|
||||
// TODO: make geometry out of this, use planes?
|
||||
foreach (var b in bru)
|
||||
{
|
||||
//Console.WriteLine(b);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Source/Game/QBrush.cs
Normal file
61
Source/Game/QBrush.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FlaxEngine;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
public class QBrush : Script
|
||||
{
|
||||
Model model;
|
||||
|
||||
public MaterialBase material;
|
||||
|
||||
public override void OnAwake()
|
||||
{
|
||||
model = Content.CreateVirtualAsset<Model>();
|
||||
model.SetupLODs(new int[] { 1 });
|
||||
|
||||
{
|
||||
var mesh = model.LODs[0].Meshes[0];
|
||||
|
||||
const float X = 0.525731112119133606f * 100f;
|
||||
const float Z = 0.850650808352039932f * 100f;
|
||||
const float N = 0.0f;
|
||||
var vertices = new[]
|
||||
{
|
||||
new Vector3(-X, N, Z),
|
||||
new Vector3(X, N, Z),
|
||||
new Vector3(-X, N, -Z),
|
||||
new Vector3(X, N, -Z),
|
||||
new Vector3(N, Z, X),
|
||||
new Vector3(N, Z, -X),
|
||||
new Vector3(N, -Z, X),
|
||||
new Vector3(N, -Z, -X),
|
||||
new Vector3(Z, X, N),
|
||||
new Vector3(-Z, X, N),
|
||||
new Vector3(Z, -X, N),
|
||||
new Vector3(-Z, -X, N)
|
||||
};
|
||||
var triangles = new[]
|
||||
{
|
||||
1, 4, 0, 4, 9, 0, 4, 5, 9, 8, 5, 4,
|
||||
1, 8, 4, 1, 10, 8, 10, 3, 8, 8, 3, 5,
|
||||
3, 2, 5, 3, 7, 2, 3, 10, 7, 10, 6, 7,
|
||||
6, 11, 7, 6, 0, 11, 6, 1, 0, 10, 1, 6,
|
||||
11, 0, 9, 2, 11, 9, 5, 2, 9, 11, 2, 7
|
||||
};
|
||||
mesh.UpdateMesh(vertices, triangles, vertices);
|
||||
}
|
||||
|
||||
StaticModel childModel = Actor.GetOrAddChild<StaticModel>();
|
||||
childModel.Model = model;
|
||||
childModel.SetMaterial(0, material);
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
Destroy(ref model);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user