Add starter project sources and assets
@@ -10,7 +10,7 @@ All contributors are welcome to help on the Godot documentation. Please familiar
|
||||
2. [Content guidelines](https://docs.godotengine.org/en/latest/contributing/documentation/content_guidelines.html)
|
||||
3. [Writing guidelines](https://docs.godotengine.org/en/latest/contributing/documentation/docs_writing_guidelines.html)
|
||||
|
||||
GDScript sources in this repository must follow the [GDScript style guide](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html). Assets in this repository must be compatible with the license of the repository.
|
||||
GDScript sources in this repository must follow the [GDScript style guide](https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_styleguide.html). Assets in this repository must be compatible with the license of the repository.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
11
src/2d_movement_starter/8_way.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
@export var speed = 400
|
||||
|
||||
func get_input():
|
||||
var input_direction = Input.get_vector("left", "right", "up", "down")
|
||||
velocity = input_direction * speed
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
move_and_slide()
|
||||
19
src/2d_movement_starter/8_way.tscn
Normal file
@@ -0,0 +1,19 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://b65rnkp1thxca"]
|
||||
|
||||
[ext_resource type="Script" path="res://8_way.gd" id="1_534hd"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxhki5gsl6umc" path="res://icon.svg" id="1_qsuh5"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sb80o"]
|
||||
size = Vector2(126, 128)
|
||||
|
||||
[node name="8way" type="CharacterBody2D"]
|
||||
position = Vector2(568, 315)
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_534hd")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_qsuh5")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_sb80o")
|
||||
5
src/2d_movement_starter/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# 2D movement project starter
|
||||
|
||||
Used by the "2D movement overview" tutorial:
|
||||
|
||||
https://docs.godotengine.org/en/latest/tutorials/2d/2d_movement.html
|
||||
15
src/2d_movement_starter/click_and_move.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
@export var speed = 400
|
||||
|
||||
var target = position
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("click"):
|
||||
target = get_global_mouse_position()
|
||||
|
||||
func _physics_process(delta):
|
||||
velocity = position.direction_to(target) * speed
|
||||
# look_at(target)
|
||||
if position.distance_to(target) > 10:
|
||||
move_and_slide()
|
||||
19
src/2d_movement_starter/click_and_move.tscn
Normal file
@@ -0,0 +1,19 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bcxaw6j7oe1je"]
|
||||
|
||||
[ext_resource type="Script" path="res://click_and_move.gd" id="1_q217u"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxhki5gsl6umc" path="res://icon.svg" id="2_d18ul"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sb80o"]
|
||||
size = Vector2(126, 128)
|
||||
|
||||
[node name="ClickAndMove" type="CharacterBody2D"]
|
||||
position = Vector2(568, 315)
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_q217u")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_d18ul")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_sb80o")
|
||||
1
src/2d_movement_starter/icon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><g transform="translate(32 32)"><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99z" fill="#363d52"/><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99zm0 4h96c6.64 0 12 5.35 12 11.99v95.98c0 6.64-5.35 11.99-12 11.99h-96c-6.64 0-12-5.35-12-11.99v-95.98c0-6.64 5.36-11.99 12-11.99z" fill-opacity=".4"/></g><g stroke-width="9.92746" transform="matrix(.10073078 0 0 .10073078 12.425923 2.256365)"><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 919.24059 771.67186)"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 104.69892 525.90697)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 784.07144 817.24284)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 389.21484 625.67104)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 367.36686 631.05679)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 511.99336 724.73954)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 634.78706 625.67104)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 656.64056 631.05679)"/></g></svg>
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
37
src/2d_movement_starter/icon.svg.import
Normal file
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxhki5gsl6umc"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.svg"
|
||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
51
src/2d_movement_starter/project.godot
Normal file
@@ -0,0 +1,51 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="2d_movement_demo"
|
||||
config/features=PackedStringArray("4.0", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
window/dpi/allow_hidpi=false
|
||||
|
||||
[input]
|
||||
|
||||
left={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
right={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
up={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
down={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
click={
|
||||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null)
|
||||
]
|
||||
}
|
||||
15
src/2d_movement_starter/rotate_and_move.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
@export var speed = 400
|
||||
@export var rotation_speed = 1.5
|
||||
|
||||
var rotation_direction = 0
|
||||
|
||||
func get_input():
|
||||
rotation_direction = Input.get_axis("left", "right")
|
||||
velocity = transform.x * Input.get_axis("down", "up") * speed
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
rotation += rotation_direction * rotation_speed * delta
|
||||
move_and_slide()
|
||||
19
src/2d_movement_starter/rotate_and_move.tscn
Normal file
@@ -0,0 +1,19 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://bp3xg7tt6xx34"]
|
||||
|
||||
[ext_resource type="Script" path="res://rotate_and_move.gd" id="1_mhtxi"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxhki5gsl6umc" path="res://icon.svg" id="2_1tsi0"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sb80o"]
|
||||
size = Vector2(126, 128)
|
||||
|
||||
[node name="RotateAndMove" type="CharacterBody2D"]
|
||||
position = Vector2(568, 315)
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_mhtxi")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_1tsi0")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_sb80o")
|
||||
11
src/2d_movement_starter/rotate_and_move_mouse.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
@export var speed = 400
|
||||
|
||||
func get_input():
|
||||
look_at(get_global_mouse_position())
|
||||
velocity = transform.x * Input.get_axis("down", "up") * speed
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
move_and_slide()
|
||||
19
src/2d_movement_starter/rotate_and_move_mouse.tscn
Normal file
@@ -0,0 +1,19 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dugbflh5on07l"]
|
||||
|
||||
[ext_resource type="Script" path="res://rotate_and_move_mouse.gd" id="1_14d5y"]
|
||||
[ext_resource type="Texture2D" uid="uid://cxhki5gsl6umc" path="res://icon.svg" id="2_dou2p"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sb80o"]
|
||||
size = Vector2(126, 128)
|
||||
|
||||
[node name="RotateAndMoveMouse" type="CharacterBody2D"]
|
||||
position = Vector2(568, 315)
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_14d5y")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_dou2p")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_sb80o")
|
||||
5
src/2d_sprite_animation_assets/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# 2D sprite animation assets
|
||||
|
||||
Used by the "2D sprite animation" tutorial:
|
||||
|
||||
https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html
|
||||
BIN
src/2d_sprite_animation_assets/run_animation/run-1.png
Normal file
|
After Width: | Height: | Size: 893 B |
BIN
src/2d_sprite_animation_assets/run_animation/run-2.png
Normal file
|
After Width: | Height: | Size: 885 B |
BIN
src/2d_sprite_animation_assets/run_animation/run-3.png
Normal file
|
After Width: | Height: | Size: 800 B |
BIN
src/2d_sprite_animation_assets/run_animation/run-4.png
Normal file
|
After Width: | Height: | Size: 749 B |
BIN
src/2d_sprite_animation_assets/run_animation/run-5.png
Normal file
|
After Width: | Height: | Size: 895 B |
BIN
src/2d_sprite_animation_assets/run_animation/run-6.png
Normal file
|
After Width: | Height: | Size: 879 B |
BIN
src/2d_sprite_animation_assets/run_animation/run-7.png
Normal file
|
After Width: | Height: | Size: 835 B |
BIN
src/2d_sprite_animation_assets/run_animation/run-8.png
Normal file
|
After Width: | Height: | Size: 760 B |
5
src/area_2d_starter/Ball.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends RigidBody2D
|
||||
|
||||
|
||||
func _on_VisibilityNotifier2D_screen_exited():
|
||||
queue_free()
|
||||
26
src/area_2d_starter/Ball.tscn
Normal file
@@ -0,0 +1,26 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Ball.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/ballBlue_09.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id=2]
|
||||
friction = 0.1
|
||||
bounce = 0.25
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 14.8321
|
||||
|
||||
[node name="Ball" type="RigidBody2D"]
|
||||
physics_material_override = SubResource( 2 )
|
||||
gravity_scale = 5.0
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
scale = Vector2( 0.2, 0.2 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
|
||||
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]
|
||||
5
src/area_2d_starter/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Area2D project starter
|
||||
|
||||
Used by the "Using Area2D" tutorial:
|
||||
|
||||
https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html
|
||||
21
src/area_2d_starter/World.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
extends Node2D
|
||||
|
||||
var Ball = load("res://Ball.tscn")
|
||||
|
||||
|
||||
func _draw():
|
||||
# Draw shaded regions to show the areas.
|
||||
draw_circle($Point.position, $Point/CollisionShape2D.shape.radius,
|
||||
Color(1, 1, 1, 0.1))
|
||||
var s = $Antigrav/CollisionShape2D.shape.extents
|
||||
draw_rect(Rect2($Antigrav.position-s, s * 2), Color(1, 1, 0, 0.1))
|
||||
s = $Slow/CollisionShape2D.shape.extents
|
||||
draw_rect(Rect2($Slow.position-s, s * 2), Color(0, 1, 1, 0.1))
|
||||
|
||||
|
||||
func _unhandled_input(event):
|
||||
if event is InputEventMouseButton and event.pressed:
|
||||
if event.button_index == BUTTON_LEFT:
|
||||
var b = Ball.instance()
|
||||
b.position = event.position
|
||||
add_child(b)
|
||||
104
src/area_2d_starter/World.tscn
Normal file
@@ -0,0 +1,104 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://World.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/Roboto-Bold.ttf" type="DynamicFontData" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 151.758, 151.815 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
extents = Vector2( 151.758, 94.5276 )
|
||||
|
||||
[sub_resource type="CircleShape2D" id=4]
|
||||
radius = 225.0
|
||||
|
||||
[sub_resource type="DynamicFont" id=5]
|
||||
size = 24
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=6]
|
||||
size = 48
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[node name="World" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Antigrav" type="Area2D" parent="."]
|
||||
editor/display_folded = true
|
||||
position = Vector2( 899.202, 468.526 )
|
||||
space_override = 3
|
||||
gravity_vec = Vector2( 0, -1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Antigrav"]
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Slow" type="Area2D" parent="."]
|
||||
editor/display_folded = true
|
||||
position = Vector2( 590.261, 516.606 )
|
||||
space_override = 3
|
||||
linear_damp = 10.0
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Slow"]
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="Point" type="Area2D" parent="."]
|
||||
editor/display_folded = true
|
||||
position = Vector2( 239.378, 288.481 )
|
||||
space_override = 3
|
||||
gravity_point = true
|
||||
gravity_vec = Vector2( 0, 0 )
|
||||
linear_damp = 0.0
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Point"]
|
||||
shape = SubResource( 4 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_left = 597.422
|
||||
margin_top = 67.5169
|
||||
margin_right = 790.422
|
||||
margin_bottom = 96.5169
|
||||
custom_fonts/font = SubResource( 5 )
|
||||
text = "Click to add a ball"
|
||||
|
||||
[node name="Label5" type="Label" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
margin_left = 272.555
|
||||
margin_top = 11.2528
|
||||
margin_right = 793.555
|
||||
margin_bottom = 68.2528
|
||||
custom_fonts/font = SubResource( 6 )
|
||||
text = "Area Override Examples"
|
||||
|
||||
[node name="Label2" type="Label" parent="."]
|
||||
margin_left = 172.885
|
||||
margin_top = 516.621
|
||||
margin_right = 308.885
|
||||
margin_bottom = 545.621
|
||||
custom_fonts/font = SubResource( 5 )
|
||||
text = "Point gravity"
|
||||
|
||||
[node name="Label3" type="Label" parent="."]
|
||||
margin_left = 793.836
|
||||
margin_top = 560.609
|
||||
margin_right = 960.836
|
||||
margin_bottom = 589.609
|
||||
custom_fonts/font = SubResource( 5 )
|
||||
text = "Reverse gravity"
|
||||
|
||||
[node name="Label4" type="Label" parent="."]
|
||||
margin_left = 519.391
|
||||
margin_top = 562.527
|
||||
margin_right = 656.391
|
||||
margin_bottom = 591.527
|
||||
custom_fonts/font = SubResource( 5 )
|
||||
text = "Linear Damp"
|
||||
BIN
src/area_2d_starter/assets/Roboto-Bold.ttf
Normal file
BIN
src/area_2d_starter/assets/ballBlue_09.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
34
src/area_2d_starter/assets/ballBlue_09.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/ballBlue_09.png-c0bf5b440aad02f790810494f82deb20.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/ballBlue_09.png"
|
||||
dest_files=[ "res://.import/ballBlue_09.png-c0bf5b440aad02f790810494f82deb20.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=false
|
||||
svg/scale=1.0
|
||||
BIN
src/area_2d_starter/assets/coin_06.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
34
src/area_2d_starter/assets/coin_06.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/coin_06.png-68534832945e7874cb02aa1ed58314f9.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/coin_06.png"
|
||||
dest_files=[ "res://.import/coin_06.png-68534832945e7874cb02aa1ed58314f9.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
7
src/area_2d_starter/default_env.tres
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 1 )
|
||||
BIN
src/area_2d_starter/icon.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
34
src/area_2d_starter/icon.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
47
src/area_2d_starter/project.godot
Normal file
@@ -0,0 +1,47 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ ]
|
||||
_global_script_class_icons={
|
||||
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="using_area_2d"
|
||||
run/main_scene="res://World.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[importer_defaults]
|
||||
|
||||
texture={
|
||||
"compress/bptc_ldr": 0,
|
||||
"compress/hdr_mode": 0,
|
||||
"compress/lossy_quality": 0.7,
|
||||
"compress/mode": 0,
|
||||
"compress/normal_map": 0,
|
||||
"detect_3d": false,
|
||||
"flags/anisotropic": false,
|
||||
"flags/filter": false,
|
||||
"flags/mipmaps": false,
|
||||
"flags/repeat": 0,
|
||||
"flags/srgb": 2,
|
||||
"process/HDR_as_SRGB": false,
|
||||
"process/fix_alpha_border": true,
|
||||
"process/invert_color": false,
|
||||
"process/premult_alpha": false,
|
||||
"size_limit": 0,
|
||||
"stream": false,
|
||||
"svg/scale": 1.0
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/default_environment="res://default_env.tres"
|
||||
24
src/character_body_2d_starter/BasicMovement.gd
Normal file
@@ -0,0 +1,24 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
var speed = 250
|
||||
var velocity = Vector2()
|
||||
var use_slide = true
|
||||
|
||||
func get_input():
|
||||
velocity = Vector2()
|
||||
if Input.is_action_pressed('ui_right'):
|
||||
velocity.x += 1
|
||||
if Input.is_action_pressed('ui_left'):
|
||||
velocity.x -= 1
|
||||
if Input.is_action_pressed('ui_down'):
|
||||
velocity.y += 1
|
||||
if Input.is_action_pressed('ui_up'):
|
||||
velocity.y -= 1
|
||||
velocity = velocity.normalized() * speed
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
if use_slide:
|
||||
move_and_slide(velocity)
|
||||
else:
|
||||
move_and_collide(velocity * delta)
|
||||
176
src/character_body_2d_starter/BasicMovement.tscn
Normal file
@@ -0,0 +1,176 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://BasicMovement.gd" type="Script" id=1]
|
||||
[ext_resource path="res://icon.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 30.8363, 31.4991 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 138.37, 10 )
|
||||
|
||||
[node name="BasicMovement" type="Node"]
|
||||
|
||||
[node name="KinematicBody2D" type="KinematicBody2D" parent="." index="0"]
|
||||
|
||||
position = Vector2( 534.268, 286.215 )
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
collision/safe_margin = 0.08
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="KinematicBody2D" index="0"]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D" index="1"]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Walls" type="Node" parent="." index="1"]
|
||||
|
||||
[node name="Wall" type="StaticBody2D" parent="Walls" index="0"]
|
||||
|
||||
position = Vector2( 790, 100 )
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Walls/Wall" index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -139.29, -10.3625, -139.29, 9.63754, 140.71, 9.63754, 140.71, -10.3625 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Wall" index="1"]
|
||||
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Wall2" type="StaticBody2D" parent="Walls" index="1"]
|
||||
|
||||
position = Vector2( 250, 510 )
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Walls/Wall2" index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -139.29, -10.3625, -139.29, 9.63754, 140.71, 9.63754, 140.71, -10.3625 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Wall2" index="1"]
|
||||
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Wall3" type="StaticBody2D" parent="Walls" index="2"]
|
||||
|
||||
position = Vector2( 240, 210 )
|
||||
rotation = 1.5708
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Walls/Wall3" index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -139.29, -10.3625, -139.29, 9.63754, 140.71, 9.63754, 140.71, -10.3625 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Wall3" index="1"]
|
||||
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Wall4" type="StaticBody2D" parent="Walls" index="3"]
|
||||
|
||||
position = Vector2( 844.578, 387.906 )
|
||||
rotation = -0.785398
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Walls/Wall4" index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -139.29, -10.3625, -139.29, 9.63754, 140.71, 9.63754, 140.71, -10.3625 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls/Wall4" index="1"]
|
||||
|
||||
shape = SubResource( 2 )
|
||||
|
||||
|
||||
80
src/character_body_2d_starter/BounceandCollide.tscn
Normal file
@@ -0,0 +1,80 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Player.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/soldier1_gun.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Wall.tscn" type="PackedScene" id=3]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 22.0227
|
||||
|
||||
[node name="BounceandCollide" type="Node"]
|
||||
|
||||
[node name="Player" type="KinematicBody2D" parent="." index="0"]
|
||||
|
||||
position = Vector2( 350, 139 )
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
collision/safe_margin = 0.08
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Player" index="0"]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player" index="1"]
|
||||
|
||||
position = Vector2( -5, 0 )
|
||||
shape = SubResource( 1 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Muzzle" type="Position2D" parent="Player" index="2"]
|
||||
|
||||
position = Vector2( 28, 8 )
|
||||
_sections_unfolded = [ "Transform", "Visibility", "Z Index" ]
|
||||
|
||||
[node name="Label" type="Label" parent="Player" index="3"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 40.0
|
||||
margin_bottom = 14.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 4
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="Walls" type="Node" parent="." index="1"]
|
||||
|
||||
[node name="Wall" parent="Walls" index="0" instance=ExtResource( 3 )]
|
||||
|
||||
[node name="Wall2" parent="Walls" index="1" instance=ExtResource( 3 )]
|
||||
|
||||
position = Vector2( 668, 85 )
|
||||
|
||||
[node name="Wall3" parent="Walls" index="2" instance=ExtResource( 3 )]
|
||||
|
||||
position = Vector2( 827.828, 263.748 )
|
||||
rotation = 1.5708
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Wall4" parent="Walls" index="3" instance=ExtResource( 3 )]
|
||||
|
||||
position = Vector2( 231.425, 302.296 )
|
||||
rotation = 1.5708
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
|
||||
19
src/character_body_2d_starter/Bullet.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
var speed = 750
|
||||
var velocity = Vector2()
|
||||
|
||||
func start(pos, dir):
|
||||
rotation = dir
|
||||
position = pos
|
||||
velocity = Vector2(speed, 0).rotated(rotation)
|
||||
|
||||
func _physics_process(delta):
|
||||
var collision = move_and_collide(velocity * delta)
|
||||
if collision:
|
||||
velocity = velocity.bounce(collision.normal)
|
||||
if collision.collider.has_method("hit"):
|
||||
collision.collider.hit()
|
||||
|
||||
func _on_VisibilityNotifier2D_screen_exited():
|
||||
queue_free()
|
||||
44
src/character_body_2d_starter/Bullet.tscn
Normal file
@@ -0,0 +1,44 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Bullet.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 3, 3 )
|
||||
|
||||
[node name="Bullet" type="KinematicBody2D"]
|
||||
|
||||
input_pickable = false
|
||||
collision_layer = 16
|
||||
collision_mask = 8
|
||||
collision/safe_margin = 0.08
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Collision" ]
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="." index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -3, -3, 3, -3, 3, 3, -3, 3 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="1"]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="." index="2"]
|
||||
|
||||
rect = Rect2( -3, -3, 6, 6 )
|
||||
|
||||
[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]
|
||||
|
||||
|
||||
12
src/character_body_2d_starter/Character.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
var velocity = Vector2(100, 100)
|
||||
var use_slide = true
|
||||
|
||||
func _physics_process(delta):
|
||||
if use_slide:
|
||||
velocity = move_and_slide(velocity)
|
||||
else:
|
||||
var collision = move_and_collide(velocity * delta)
|
||||
if collision:
|
||||
velocity = velocity.slide(collision.normal)
|
||||
29
src/character_body_2d_starter/PlatformPlayer.gd
Normal file
@@ -0,0 +1,29 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
export (int) var run_speed = 100
|
||||
export (int) var jump_speed = -400
|
||||
export (int) var gravity = 1200
|
||||
|
||||
var velocity = Vector2()
|
||||
var jumping = false
|
||||
|
||||
func get_input():
|
||||
velocity.x = 0
|
||||
var right = Input.is_action_pressed('ui_right')
|
||||
var left = Input.is_action_pressed('ui_left')
|
||||
var jump = Input.is_action_just_pressed('ui_select')
|
||||
|
||||
if jump and is_on_floor():
|
||||
jumping = true
|
||||
velocity.y = jump_speed
|
||||
if right:
|
||||
velocity.x += run_speed
|
||||
if left:
|
||||
velocity.x -= run_speed
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
velocity.y += gravity * delta
|
||||
if jumping and is_on_floor():
|
||||
jumping = false
|
||||
velocity = move_and_slide(velocity, Vector2(0, -1))
|
||||
70
src/character_body_2d_starter/PlatformPlayer.tscn
Normal file
@@ -0,0 +1,70 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://PlatformPlayer.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 8, 12 )
|
||||
|
||||
[node name="PlatformPlayer" type="KinematicBody2D"]
|
||||
|
||||
input_pickable = false
|
||||
collision_layer = 2
|
||||
collision_mask = 13
|
||||
collision/safe_margin = 0.08
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Collision", "Transform", "collision" ]
|
||||
run_speed = 100
|
||||
jump_speed = -400
|
||||
gravity = 1200
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="." index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -8, -12, 8, -12, 8, 12, -8, 12 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="1"]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." index="2"]
|
||||
|
||||
position = Vector2( 0, 5 )
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 0.3, 0.3 )
|
||||
limit_left = -75
|
||||
limit_top = 50
|
||||
limit_right = 725
|
||||
limit_bottom = 550
|
||||
limit_smoothed = false
|
||||
drag_margin_h_enabled = true
|
||||
drag_margin_v_enabled = true
|
||||
smoothing_enabled = false
|
||||
smoothing_speed = 5.0
|
||||
offset_v = 0.0
|
||||
offset_h = 0.0
|
||||
drag_margin_left = 0.1
|
||||
drag_margin_top = 0.1
|
||||
drag_margin_right = 0.1
|
||||
drag_margin_bottom = 0.1
|
||||
editor_draw_screen = true
|
||||
editor_draw_limits = false
|
||||
editor_draw_drag_margin = false
|
||||
_sections_unfolded = [ "Drag Margin", "Limit" ]
|
||||
|
||||
|
||||
81
src/character_body_2d_starter/Platformer.tscn
Normal file
@@ -0,0 +1,81 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://PlatformPlayer.tscn" type="PackedScene" id=1]
|
||||
|
||||
[node name="PlatformGame" type="Node" index="0"]
|
||||
|
||||
[node name="Walls" type="Node" parent="." index="0"]
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Walls" index="0"]
|
||||
|
||||
position = Vector2( 485.296, 379.731 )
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Walls/StaticBody2D" index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -435.83, 105.853, -388.346, 74.7186, -86.0178, 74.7186, -32.3343, 50.5918, 9.76965, 11.9966, 68.5397, 12.8737, 72.0483, 64.6264, 26.4358, 104.976 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 0.341461, 0.523438, 0.34857, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Walls/StaticBody2D" index="1"]
|
||||
|
||||
build_mode = 0
|
||||
polygon = PoolVector2Array( -434.052, 106.741, -387.516, 75.3428, -85.3116, 75.3428, -33.1687, 51.2337, 10.564, 12.5471, 66.6316, 14.2292, 73.3597, 63.5686, 24.5809, 106.18 )
|
||||
|
||||
[node name="StaticBody2D2" type="StaticBody2D" parent="Walls" index="1"]
|
||||
|
||||
position = Vector2( 491.464, 318.057 )
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Walls/StaticBody2D2" index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -330.327, 94.9664, -340.98, 82.6316, -113.906, 86.5563, -127.923, 96.6485 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 0.341461, 0.523438, 0.34857, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Walls/StaticBody2D2" index="1"]
|
||||
|
||||
build_mode = 0
|
||||
polygon = PoolVector2Array( -328.645, 96.0878, -341.217, 83.0776, -114.513, 86.9529, -126.802, 97.2092 )
|
||||
|
||||
[node name="PlatformPlayer" parent="." index="1" instance=ExtResource( 1 )]
|
||||
|
||||
position = Vector2( 393.654, 427.999 )
|
||||
|
||||
|
||||
26
src/character_body_2d_starter/Player.gd
Normal file
@@ -0,0 +1,26 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
var Bullet = preload("res://Bullet.tscn")
|
||||
var speed = 200
|
||||
var velocity = Vector2()
|
||||
|
||||
func get_input():
|
||||
velocity = Vector2()
|
||||
if Input.is_action_pressed('backward'):
|
||||
velocity = Vector2(-speed/3, 0).rotated(rotation)
|
||||
if Input.is_action_pressed('forward'):
|
||||
velocity = Vector2(speed, 0).rotated(rotation)
|
||||
if Input.is_action_just_pressed('mouse_click'):
|
||||
shoot()
|
||||
|
||||
func shoot():
|
||||
var b = Bullet.instance()
|
||||
b.start($Muzzle.global_position, rotation)
|
||||
get_parent().add_child(b)
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
var dir = get_global_mouse_position() - global_position
|
||||
if dir.length() > 5:
|
||||
rotation = dir.angle()
|
||||
velocity = move_and_slide(velocity)
|
||||
5
src/character_body_2d_starter/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# CharacterBody2D project starter
|
||||
|
||||
Used by the "Using CharacterBody2D/3D" tutorial:
|
||||
|
||||
https://docs.godotengine.org/en/latest/tutorials/physics/using_character_body_2d.html
|
||||
4
src/character_body_2d_starter/Wall.gd
Normal file
@@ -0,0 +1,4 @@
|
||||
extends StaticBody2D
|
||||
|
||||
func hit():
|
||||
$AnimationPlayer.play('flash')
|
||||
73
src/character_body_2d_starter/Wall.tscn
Normal file
@@ -0,0 +1,73 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Wall.gd" type="Script" id=1]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 170, 10 )
|
||||
|
||||
[sub_resource type="Animation" id=2]
|
||||
|
||||
resource_name = "flash"
|
||||
length = 0.5
|
||||
loop = false
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Polygon2D:color")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 0, 0, 1 ), Color( 1, 1, 1, 1 ) ]
|
||||
}
|
||||
|
||||
[node name="Wall" type="StaticBody2D"]
|
||||
|
||||
position = Vector2( 390.63, 482 )
|
||||
input_pickable = false
|
||||
collision_layer = 8
|
||||
collision_mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="." index="0"]
|
||||
|
||||
polygon = PoolVector2Array( -170, -10, 170, -10, 170, 10, -170, 10 )
|
||||
uv = PoolVector2Array( )
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
vertex_colors = PoolColorArray( )
|
||||
offset = Vector2( 0, 0 )
|
||||
antialiased = false
|
||||
texture = null
|
||||
texture_offset = Vector2( 0, 0 )
|
||||
texture_scale = Vector2( 1, 1 )
|
||||
texture_rotation_degrees = 0.0
|
||||
invert_enable = false
|
||||
invert_border = 100.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="1"]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="2"]
|
||||
|
||||
root_node = NodePath("..")
|
||||
autoplay = ""
|
||||
playback_process_mode = 1
|
||||
playback_default_blend_time = 0.0
|
||||
playback_speed = 1.0
|
||||
anims/flash = SubResource( 2 )
|
||||
blend_times = [ ]
|
||||
|
||||
|
||||
BIN
src/character_body_2d_starter/assets/soldier1_gun.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
32
src/character_body_2d_starter/assets/soldier1_gun.png.import
Normal file
@@ -0,0 +1,32 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/soldier1_gun.png-c6a4b98c26f714c536241bcc3abc6d46.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/soldier1_gun.png"
|
||||
source_md5="511c324d0795f775677a90d17b1e8357"
|
||||
|
||||
dest_files=[ "res://.import/soldier1_gun.png-c6a4b98c26f714c536241bcc3abc6d46.stex" ]
|
||||
dest_md5="923c65170fa22250959d5c695ba084a6"
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
4
src/character_body_2d_starter/attributions.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
"Sunny Land" art pack by Ansimuz:
|
||||
https://opengameart.org/content/sunny-land-2d-pixel-art-pack
|
||||
Top down shooter character by Kenney:
|
||||
https://opengameart.org/content/topdown-shooter
|
||||
101
src/character_body_2d_starter/default_env.tres
Normal file
@@ -0,0 +1,101 @@
|
||||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
|
||||
radiance_size = 4
|
||||
sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 )
|
||||
sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 )
|
||||
sky_curve = 0.25
|
||||
sky_energy = 1.0
|
||||
ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 )
|
||||
ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 )
|
||||
ground_curve = 0.01
|
||||
ground_energy = 1.0
|
||||
sun_color = Color( 1, 1, 1, 1 )
|
||||
sun_latitude = 35.0
|
||||
sun_longitude = 0.0
|
||||
sun_angle_min = 1.0
|
||||
sun_angle_max = 100.0
|
||||
sun_curve = 0.05
|
||||
sun_energy = 16.0
|
||||
texture_size = 2
|
||||
|
||||
[resource]
|
||||
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 1 )
|
||||
background_sky_custom_fov = 0.0
|
||||
background_color = Color( 0, 0, 0, 1 )
|
||||
background_energy = 1.0
|
||||
background_canvas_max_layer = 0
|
||||
ambient_light_color = Color( 0, 0, 0, 1 )
|
||||
ambient_light_energy = 1.0
|
||||
ambient_light_sky_contribution = 1.0
|
||||
fog_enabled = false
|
||||
fog_color = Color( 0.5, 0.6, 0.7, 1 )
|
||||
fog_sun_color = Color( 1, 0.9, 0.7, 1 )
|
||||
fog_sun_amount = 0.0
|
||||
fog_depth_enabled = true
|
||||
fog_depth_begin = 10.0
|
||||
fog_depth_curve = 1.0
|
||||
fog_transmit_enabled = false
|
||||
fog_transmit_curve = 1.0
|
||||
fog_height_enabled = false
|
||||
fog_height_min = 0.0
|
||||
fog_height_max = 100.0
|
||||
fog_height_curve = 1.0
|
||||
tonemap_mode = 0
|
||||
tonemap_exposure = 1.0
|
||||
tonemap_white = 1.0
|
||||
auto_exposure_enabled = false
|
||||
auto_exposure_scale = 0.4
|
||||
auto_exposure_min_luma = 0.05
|
||||
auto_exposure_max_luma = 8.0
|
||||
auto_exposure_speed = 0.5
|
||||
ss_reflections_enabled = false
|
||||
ss_reflections_max_steps = 64
|
||||
ss_reflections_fade_in = 0.15
|
||||
ss_reflections_fade_out = 2.0
|
||||
ss_reflections_depth_tolerance = 0.2
|
||||
ss_reflections_roughness = true
|
||||
ssao_enabled = false
|
||||
ssao_radius = 1.0
|
||||
ssao_intensity = 1.0
|
||||
ssao_radius2 = 0.0
|
||||
ssao_intensity2 = 1.0
|
||||
ssao_bias = 0.01
|
||||
ssao_light_affect = 0.0
|
||||
ssao_color = Color( 0, 0, 0, 1 )
|
||||
ssao_quality = 0
|
||||
ssao_blur = 3
|
||||
ssao_edge_sharpness = 4.0
|
||||
dof_blur_far_enabled = false
|
||||
dof_blur_far_distance = 10.0
|
||||
dof_blur_far_transition = 5.0
|
||||
dof_blur_far_amount = 0.1
|
||||
dof_blur_far_quality = 1
|
||||
dof_blur_near_enabled = false
|
||||
dof_blur_near_distance = 2.0
|
||||
dof_blur_near_transition = 1.0
|
||||
dof_blur_near_amount = 0.1
|
||||
dof_blur_near_quality = 1
|
||||
glow_enabled = false
|
||||
glow_levels/1 = false
|
||||
glow_levels/2 = false
|
||||
glow_levels/3 = true
|
||||
glow_levels/4 = false
|
||||
glow_levels/5 = true
|
||||
glow_levels/6 = false
|
||||
glow_levels/7 = false
|
||||
glow_intensity = 0.8
|
||||
glow_strength = 1.0
|
||||
glow_bloom = 0.0
|
||||
glow_blend_mode = 2
|
||||
glow_hdr_threshold = 1.0
|
||||
glow_hdr_scale = 2.0
|
||||
glow_bicubic_upscale = false
|
||||
adjustment_enabled = false
|
||||
adjustment_brightness = 1.0
|
||||
adjustment_contrast = 1.0
|
||||
adjustment_saturation = 1.0
|
||||
|
||||
BIN
src/character_body_2d_starter/icon.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
32
src/character_body_2d_starter/icon.png.import
Normal file
@@ -0,0 +1,32 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
source_md5="ae7e641067601e2184afcade49abd283"
|
||||
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
|
||||
dest_md5="37fab264f7edd819d74f710b6a7c22dc"
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
66
src/character_body_2d_starter/project.godot
Normal file
@@ -0,0 +1,66 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=3
|
||||
|
||||
[application]
|
||||
|
||||
config/name="using_kinematic2d"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/resizable=false
|
||||
window/size/test_width=1024
|
||||
window/size/test_height=600
|
||||
window/stretch/mode="2d"
|
||||
window/stretch/aspect="keep"
|
||||
window/stretch/shrink="1"
|
||||
|
||||
[importer_defaults]
|
||||
|
||||
texture={
|
||||
"compress/hdr_mode": 0,
|
||||
"compress/lossy_quality": 0.7,
|
||||
"compress/mode": 0,
|
||||
"compress/normal_map": 0,
|
||||
"detect_3d": true,
|
||||
"flags/anisotropic": false,
|
||||
"flags/filter": false,
|
||||
"flags/mipmaps": false,
|
||||
"flags/repeat": 0,
|
||||
"flags/srgb": 2,
|
||||
"process/HDR_as_SRGB": false,
|
||||
"process/fix_alpha_border": true,
|
||||
"process/premult_alpha": false,
|
||||
"size_limit": 0,
|
||||
"stream": false,
|
||||
"svg/scale": 1.0
|
||||
}
|
||||
|
||||
[input]
|
||||
|
||||
forward=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
backward=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
mouse_click=[ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null)
|
||||
]
|
||||
|
||||
[layer_names]
|
||||
|
||||
2d_physics/layer_1="player"
|
||||
2d_physics/layer_2="enemies"
|
||||
2d_physics/layer_3="coins"
|
||||
2d_physics/layer_4="walls"
|
||||
2d_physics/layer_5="bullets"
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/2d/use_pixel_snap=true
|
||||
environment/default_environment="res://default_env.tres"
|
||||
5
src/cutout_animation_assets/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Cutout animation assets
|
||||
|
||||
Used by the "Cutout animation" tutorial:
|
||||
|
||||
https://docs.godotengine.org/en/latest/tutorials/animation/cutout_animation.html
|
||||
BIN
src/cutout_animation_assets/gbot/gBot_arm_l.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_arm_r.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_body.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_complete.png
Normal file
|
After Width: | Height: | Size: 322 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_foot_l.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_foot_r.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_forearm_l.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_forearm_r.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_head.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_hip.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_jaw.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_leg_l.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_leg_r.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_shin_l.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/cutout_animation_assets/gbot/gBot_shin_r.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
5
src/dodge_the_creeps_2d_assets/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Dodge the Creeps 2D assets
|
||||
|
||||
Used by the "Your first 2D game" tutorial:
|
||||
|
||||
https://docs.godotengine.org/en/latest/getting_started/first_2d_game/index.html
|
||||
BIN
src/dodge_the_creeps_2d_assets/art/House In a Forest Loop.ogg
Normal file
BIN
src/dodge_the_creeps_2d_assets/art/enemyFlyingAlt_1.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/enemyFlyingAlt_2.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/enemySwimming_1.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/enemySwimming_2.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/enemyWalking_1.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/enemyWalking_2.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/gameover.wav
Normal file
BIN
src/dodge_the_creeps_2d_assets/art/playerGrey_up1.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/playerGrey_up2.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/playerGrey_walk1.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/dodge_the_creeps_2d_assets/art/playerGrey_walk2.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
253
src/dodge_the_creeps_2d_assets/fonts/FONTLOG.txt
Normal file
@@ -0,0 +1,253 @@
|
||||
Please distribute this file along with the Xolonium fonts when possible.
|
||||
|
||||
|
||||
Source
|
||||
|
||||
Find the sourcefiles of Xolonium at
|
||||
<gitlab.com/sev/xolonium>
|
||||
|
||||
|
||||
Credits
|
||||
|
||||
Xolonium is created with FontForge <fontforge.org>,
|
||||
Inkscape <inkscape.org>, Python <python.org>, and
|
||||
FontTools <github.com/fonttools>.
|
||||
|
||||
It originated as a custom font for the open-source
|
||||
game Xonotic <xonotic.org>. With many thanks to the
|
||||
Xonotic community for your support.
|
||||
|
||||
|
||||
Supported OpenType features
|
||||
|
||||
case Provides case sensitive placement of punctuation,
|
||||
brackets, and math symbols for uppercase text.
|
||||
frac Replaces number/number sequences with diagonal fractions.
|
||||
Numbers that touch a slash should not exceed 10 digits.
|
||||
kern Provides kerning for Latin, Greek, and Cyrillic scripts.
|
||||
locl Dutch: Replaces j with a stressed version if it follows í.
|
||||
Sami: Replaces n-form Eng with the preferred N-form version.
|
||||
Romanian and Moldovan: Replaces ŞşŢţ with the preferred ȘșȚț.
|
||||
pnum Replaces monospaced digits with proportional versions.
|
||||
sinf Replaces digits with scientific inferiors below the baseline.
|
||||
subs Replaces digits with subscript versions on the baseline.
|
||||
sups Replaces digits with superscript versions.
|
||||
zero Replaces zero with a slashed version.
|
||||
|
||||
|
||||
Supported glyph sets
|
||||
|
||||
Adobe Latin 3
|
||||
OpenType W1G
|
||||
ISO 8859-1 Western European
|
||||
ISO 8859-2 Central European
|
||||
ISO 8859-3 South European
|
||||
ISO 8859-4 North European
|
||||
ISO 8859-5 Cyrillic
|
||||
ISO 8859-7 Greek
|
||||
ISO 8859-9 Turkish
|
||||
ISO 8859-10 Nordic
|
||||
ISO 8859-13 Baltic Rim
|
||||
ISO 8859-14 Celtic
|
||||
ISO 8859-15 Western European
|
||||
ISO 8859-16 South-Eastern European
|
||||
|
||||
|
||||
Available glyphs
|
||||
|
||||
!"#$%&'()*+,-./0123456789:;<=>?
|
||||
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
|
||||
`abcdefghijklmnopqrstuvwxyz{|}~
|
||||
|
||||
¡¢£¤¥¦§¨©ª«¬ ®¯°±²³´µ¶·¸¹º»¼½¾¿
|
||||
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß
|
||||
àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
|
||||
ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğ
|
||||
ĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľ
|
||||
ĿŀŁłŃńŅņŇňŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞş
|
||||
ŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽž
|
||||
ƒǺǻǼǽǾǿȘșȚțȷ
|
||||
|
||||
ˆˇˉ˘˙˚˛˜˝
|
||||
|
||||
ͺ;΄΅Ά·ΈΉΊΌΎΏΐ
|
||||
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫάέήίΰ
|
||||
αβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ
|
||||
|
||||
ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОП
|
||||
РСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп
|
||||
рстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџ
|
||||
ѢѣѲѳѴѵҐґҒғҔҕҖҗҘҙҚқҜҝҞҟҠҡҢңҤҥҦҧҨҩ
|
||||
ҪҫҬҭҮүҰұҲҳҴҵҶҷҸҹҺһҼҽӀӁӂӇӈӋӌӏӐӑӒӓ
|
||||
ӔӕӖӗӘәӜӝӞӟӠӡӢӣӤӥӦӧӨөӮӯӰӱӲӳӴӵӶӷӸӹ
|
||||
Ԥԥ
|
||||
|
||||
ḂḃḊḋḞḟṀṁṖṗṠṡṪṫẀẁẂẃẄẅẞỲỳ
|
||||
|
||||
‒–—―‘’‚‛“”„‟†‡•…‰′″‹›‽‾⁄
|
||||
⁰⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎
|
||||
₤₦₩₫€₯₱₹₺₽₿
|
||||
℅ℓ№℗™Ω℮
|
||||
⅛⅜⅝⅞
|
||||
←↑→↓
|
||||
∂∆∏∑−∕∙√∞∟∫≈≠≤≥
|
||||
⌖
|
||||
■▬▮▰▲▶▼◀◆◊●◢◣◤◥
|
||||
☄★☠☢☣⚙⚛⚠⚡⛔
|
||||
❇❈❌❤❰❱❲❳
|
||||
fffiflffiffl
|
||||
🌌🌍🌎🌏👽💣🔥🔫
|
||||
😁😃😄😆😇😈😉😊😎😐😒😕😘
|
||||
😛😝😞😟😠😣😭😮😲😴😵
|
||||
🚀
|
||||
|
||||
|
||||
Debugging glyphs
|
||||
|
||||
U+EFFD Font version
|
||||
U+F000 Font hinting indicator
|
||||
|
||||
|
||||
Changelog
|
||||
|
||||
Xolonium 4.1 2016-11-22 Severin Meyer <sev.ch@web.de>
|
||||
Reverted frac OpenType feature to a more stable implementation
|
||||
|
||||
Xolonium 4.0 2016-10-08 Severin Meyer <sev.ch@web.de>
|
||||
Decreased width of most glyphs
|
||||
Thinner vertical stems in Xolonium-Regular
|
||||
Thicker horizontal stems in Xolonium-Bold
|
||||
Revised diagonal stems
|
||||
Lowered middle bars
|
||||
Revised diacritical bars
|
||||
Added glyphs:
|
||||
ӏẞ₿
|
||||
U+2007 U+2008 U+2009 U+200A U+202F
|
||||
U+EFFD U+F000
|
||||
Revised glyphs:
|
||||
$&,JKQRXkwxy~¢¤ßǻ˜ζκλμξφЖУжћѴѵ∕₱₺₦₩€ℓ№≈ffffiffl
|
||||
❤🌍🌎🌏😁😄😇😈😉😊😘😭😮😴🚀
|
||||
Removed uncommon glyphs:
|
||||
ʼnſʼҌҍҎҏҾҿӃӄӇӈӚӛӪӫӬӭ
|
||||
U+0312 U+0313 U+0326
|
||||
Simplified OpenType features pnum, zero, and case
|
||||
Removed OpenType feature dlig
|
||||
Revised vertical metrics
|
||||
Merged outlines of composite glyphs in otf version
|
||||
Added ttf version with custom outlines and instructions
|
||||
Added woff and woff2 version
|
||||
|
||||
Xolonium 3.1 2015-06-10 Severin Meyer <sev.ch@web.de>
|
||||
Added currency glyphs:
|
||||
₦₩₫₱₹₺₽
|
||||
Revised glyph:
|
||||
₯
|
||||
Relicensed public release under the SIL Open Font License 1.1
|
||||
|
||||
Xolonium 3.0 2015-05-04 Severin Meyer <sev.ch@web.de>
|
||||
Decreased width of glyphs
|
||||
Decreased descender height
|
||||
Increased height of super/subscript glyphs
|
||||
Revised width of dashes, underscore, and overscore
|
||||
Sharper bends with more circular proportions
|
||||
Decreased stroke thickness of mathematical glyphs
|
||||
Revised diacritical marks
|
||||
Revised diacritical bars
|
||||
Revised Cyrillic hooks
|
||||
Revised glyphs:
|
||||
GQRYjmuwßŊŒſƒǻfffiffiffl
|
||||
ΞΨΩδζιξπςστυφω
|
||||
ЉЄДЛУЭЯбдлэяєљђєћѢѣҨҩҼҽӃӄӘә
|
||||
#$&'()*,/69?@[]{}~¡£¤¥§©®¿
|
||||
‹›₤€₯ℓ№℗℮←↑→↓∂∏∑∞≈▰☄❈❰❱❲❳😝
|
||||
Raised vertical position of mathematical glyphs
|
||||
Unified advance width of numeral and monetary glyphs
|
||||
Unified advance width of mathematical glyphs
|
||||
Revised bearings
|
||||
Rewrote kern feature
|
||||
Bolder Xolonium-Bold with improved proportions
|
||||
Updated glyph names to conform to the AGLFN 1.7
|
||||
Revised hints and PS Private Dictionary
|
||||
Added glyphs:
|
||||
ӶӷԤԥ
|
||||
Added OpenType features:
|
||||
case frac liga locl pnum sinf subs sups zero
|
||||
|
||||
Xolonium 2.4 2014-12-23 Severin Meyer <sev.ch@web.de>
|
||||
Added dingbats:
|
||||
⛔💣🔥
|
||||
Revised size and design of emoticons
|
||||
Revised dingbats:
|
||||
⌖☄☠☣⚙⚛⚠⚡❇❈🌌🌍🌎🌏🔫
|
||||
Removed dingbat:
|
||||
💥
|
||||
|
||||
Xolonium 2.3 2014-08-14 Severin Meyer <sev.ch@web.de>
|
||||
Bugfixed ε and έ, thanks to bowzee for the feedback
|
||||
|
||||
Xolonium 2.2 2014-03-01 Severin Meyer <sev.ch@web.de>
|
||||
Added dingbats:
|
||||
⌖◆●❌💥
|
||||
Revised dingbats:
|
||||
•←↑→↓◊☄★☠☣⚙⚛⚠⚡❇❈❤🌌🌍🌎🌏👽🔫🚀
|
||||
Removed dingbats:
|
||||
♻✪💡📡🔋🔧🔭
|
||||
|
||||
Xolonium 2.1 2013-10-20 Severin Meyer <sev.ch@web.de>
|
||||
Added dingbats:
|
||||
←↑→↓❰❱❲❳■▬▮▰▲▶▼◀◢◣◤◥
|
||||
☄★☠☢☣♻⚙⚛⚠⚡✪❇❈❤
|
||||
🌌🌍🌎🌏👽💡📡🔋🔧🔫🔭🚀
|
||||
😁😃😄😆😇😈😉😊😎😐😒😕
|
||||
😘😛😝😞😟😠😣😭😮😲😴😵
|
||||
|
||||
Xolonium 2.0.1 2013-07-12 Severin Meyer <sev.ch@web.de>
|
||||
Reorganised and simplified files
|
||||
|
||||
Xolonium 2.0 2012-08-11 Severin Meyer <sev.ch@web.de>
|
||||
Revised bends
|
||||
Revised thickness of uppercase diagonal stems
|
||||
Revised diacritical marks
|
||||
Revised hints and PS Private Dictionary
|
||||
Revised glyphs:
|
||||
*1469@DPRly{}§©®¶ÐÞƒΘΞαεζνξνυЄЉЊ
|
||||
ЏБЗЛУЧЪЫЬЭЯбзлчъыьэяєљњџ•€∂∙√∞∫≠
|
||||
Completed glyph sets:
|
||||
Adobe Latin 3
|
||||
OpenType World Glyph Set 1 (W1G)
|
||||
Ghostscript Standard (ghostscript-fonts-std-8.11)
|
||||
Added OpenType kern feature
|
||||
Added Xolonium-Bold
|
||||
|
||||
Xolonium 1.2 2011-02-12 Severin Meyer <sev.ch@web.de>
|
||||
Revised glyphs:
|
||||
D·Ðı
|
||||
Completed glyph sets:
|
||||
ISO 8859-7 (Greek)
|
||||
Unicode Latin Extended-A block
|
||||
Added glyphs:
|
||||
†‡•…‰⁄™∂∑−√∞≠≤≥
|
||||
|
||||
Xolonium 1.1 2011-01-17 Severin Meyer <sev.ch@web.de>
|
||||
Revised placement of cedilla and ogonek in accented glyphs
|
||||
Revised glyphs:
|
||||
,;DKTjkvwxy¥§Ð˛€
|
||||
Completed glyph sets:
|
||||
ISO 8859-2 (Central European)
|
||||
ISO 8859-3 (South European, Esperanto)
|
||||
ISO 8859-4 (North European)
|
||||
ISO 8859-5 (Cyrillic)
|
||||
ISO 8859-9 (Turkish)
|
||||
ISO 8859-10 (Nordic)
|
||||
ISO 8859-13 (Baltic Rim)
|
||||
ISO 8859-14 (Celtic)
|
||||
ISO 8859-16 (South-Eastern European)
|
||||
Added glyphs:
|
||||
ȷʼ̒ ЀЍѐѝ‒–—‘’‚‛“”„‟‹›
|
||||
|
||||
Xolonium 1.0 2011-01-04 Severin Meyer <sev.ch@web.de>
|
||||
Completed glyph sets:
|
||||
ISO 8859-1 (Western European)
|
||||
ISO 8859-15 (Western European)
|
||||
Added glyphs:
|
||||
ĄĆĘŁŃŚŹŻąćęłńśźżıˆˇ˙˚˛˜
|
||||
94
src/dodge_the_creeps_2d_assets/fonts/LICENSE.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
Copyright 2011-2016 Severin Meyer <sev.ch@web.de>,
|
||||
with Reserved Font Name Xolonium.
|
||||
|
||||
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
src/dodge_the_creeps_2d_assets/fonts/Xolonium-Regular.ttf
Normal file
52
src/gridmap_starter/GridMap_Demo.tscn
Normal file
@@ -0,0 +1,52 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://MeshLibrary.tres" type="MeshLibrary" id=1]
|
||||
|
||||
[node name="GridMap_Demo" type="GridMap" index="0"]
|
||||
|
||||
theme = ExtResource( 1 )
|
||||
cell_size = Vector3( 2, 2, 2 )
|
||||
cell_octant_size = 8
|
||||
cell_center_x = true
|
||||
cell_center_y = false
|
||||
cell_center_z = true
|
||||
cell_scale = 1.0
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
data = {
|
||||
"cells": PoolIntArray( 65534, 0, 12, 65534, 1, 12, 65534, 2, 12, 65534, 3, 12, 65533, 4, 8, 65534, 4, 0, 65535, 4, 1441800, 131071, 4, 1114124, 196607, 4, 1114124, 262143, 4, 1114124, 65533, 5, 1048584, 65534, 5, 655362, 65535, 5, 655368, 131071, 5, 1114124, 196607, 5, 1114124, 262143, 5, 1114124, 65534, 65535, 10 )
|
||||
}
|
||||
_sections_unfolded = [ "Cell", "Collision" ]
|
||||
__meta__ = {
|
||||
"_editor_clip_": 0,
|
||||
"_editor_floor_": Vector3( -1, 0, 0 )
|
||||
}
|
||||
|
||||
[node name="DirectionalLight" type="DirectionalLight" parent="." index="0"]
|
||||
|
||||
transform = Transform( 0.0358735, 0.482339, -0.87525, -0.0197528, 0.875985, 0.481934, 0.999161, 0, 0.0409521, -17.3353, 4.27635, 2.5183 )
|
||||
layers = 1
|
||||
light_color = Color( 1, 1, 1, 1 )
|
||||
light_energy = 1.0
|
||||
light_indirect_energy = 1.0
|
||||
light_negative = false
|
||||
light_specular = 0.5
|
||||
light_bake_mode = 1
|
||||
light_cull_mask = -1
|
||||
shadow_enabled = false
|
||||
shadow_color = Color( 0, 0, 0, 1 )
|
||||
shadow_bias = 0.1
|
||||
shadow_contact = 0.0
|
||||
shadow_reverse_cull_face = false
|
||||
editor_only = false
|
||||
directional_shadow_mode = 2
|
||||
directional_shadow_split_1 = 0.1
|
||||
directional_shadow_split_2 = 0.2
|
||||
directional_shadow_split_3 = 0.5
|
||||
directional_shadow_blend_splits = false
|
||||
directional_shadow_normal_bias = 0.8
|
||||
directional_shadow_bias_split_scale = 0.25
|
||||
directional_shadow_depth_range = 0
|
||||
directional_shadow_max_distance = 200.0
|
||||
|
||||
|
||||
732
src/gridmap_starter/MeshLibrary.tres
Normal file
328
src/gridmap_starter/MeshLibrary_Source.tscn
Normal file
5
src/gridmap_starter/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# GridMap project starter
|
||||
|
||||
Used by the "Using GridMaps" tutorial:
|
||||
|
||||
https://docs.godotengine.org/en/latest/tutorials/3d/using_gridmaps.html
|
||||