2d/platformer works flawlessly on Godot 3.1 beta 8 (#310)

* 2d/platformer works flawlessly on Godot 3.1 beta 8
* fix warnings for inferred node type
* every script has a class_name
* formatted code for better clarity
* each files has its own subfolder

* As suggested by @akien-mga
* states are back to const instead of enum
* class_name comes after extends
* better code style

* PascalCase for nodes
This commit is contained in:
TestDotCom
2019-03-04 12:12:08 +01:00
committed by Rémi Verschelde
parent cfcc0f3964
commit 81441c42b7
76 changed files with 1010 additions and 1426 deletions

View File

@@ -6,20 +6,63 @@
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=3
config_version=4
_global_script_classes=[ {
"base": "RigidBody2D",
"class": "Bullet",
"language": "GDScript",
"path": "res://player/bullet.gd"
}, {
"base": "Area2D",
"class": "Coin",
"language": "GDScript",
"path": "res://coin/coin.gd"
}, {
"base": "KinematicBody2D",
"class": "Enemy",
"language": "GDScript",
"path": "res://enemy/enemy.gd"
}, {
"base": "Node2D",
"class": "MovingPlatform",
"language": "GDScript",
"path": "res://platform/moving_platform.gd"
}, {
"base": "KinematicBody2D",
"class": "Player",
"language": "GDScript",
"path": "res://player/player.gd"
} ]
_global_script_class_icons={
"Bullet": "",
"Coin": "",
"Enemy": "",
"MovingPlatform": "",
"Player": ""
}
[application]
config/name="Platformer 2D"
run/main_scene="res://stage.tscn"
run/main_scene="res://Stage.tscn"
config/icon="res://icon.png"
target_fps="60"
[debug]
gdscript/completion/autocomplete_setters_and_getters=true
gdscript/warnings/unsafe_property_access=true
gdscript/warnings/unsafe_method_access=true
gdscript/warnings/unsafe_cast=true
gdscript/warnings/unsafe_call_argument=true
[display]
window/size/width=800
window/size/height=480
window/stretch/mode="2d"
window/stretch/aspect="keep"
stretch/aspect="keep_height"
stretch/mode="2d"
@@ -33,22 +76,37 @@ repeat=false
[input]
jump=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
jump={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
move_left=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
}
move_left={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
]
move_right=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
}
move_right={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
]
shoot=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
}
shoot={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null)
]
spawn=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777244,"unicode":0,"echo":false,"script":null)
}
spawn={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777244,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
]
}
[physics]
@@ -62,6 +120,15 @@ use_pixel_snap=true
mipmap_policy=1
[rendering]
quality/intended_usage/framebuffer_allocation=0
quality/intended_usage/framebuffer_allocation.mobile=1
quality/filters/anisotropic_filter_level=2
quality/filters/use_nearest_mipmap_filter=true
quality/voxel_cone_tracing/high_quality=false
quality/depth/hdr=false
[texture_import]
filter=false