aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.import/.gdignore1
-rw-r--r--.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md53
-rw-r--r--.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stexbin0 -> 1496 bytes
-rw-r--r--KinematicBody2D.gd21
-rw-r--r--Node.gd0
-rw-r--r--Node2D.tscn20
-rw-r--r--default_env.tres7
-rw-r--r--icon.pngbin0 -> 3305 bytes
-rw-r--r--icon.png.import35
-rw-r--r--project.godot53
10 files changed, 140 insertions, 0 deletions
diff --git a/.import/.gdignore b/.import/.gdignore
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/.import/.gdignore
@@ -0,0 +1 @@
+
diff --git a/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5 b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5
new file mode 100644
index 0000000..5328bc7
--- /dev/null
+++ b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5
@@ -0,0 +1,3 @@
+source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
+dest_md5="26ea799ea0a3da9e753b3ebe822e0570"
+
diff --git a/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
new file mode 100644
index 0000000..71f6913
--- /dev/null
+++ b/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
Binary files differ
diff --git a/KinematicBody2D.gd b/KinematicBody2D.gd
new file mode 100644
index 0000000..dad1eb5
--- /dev/null
+++ b/KinematicBody2D.gd
@@ -0,0 +1,21 @@
+extends KinematicBody2D
+
+export (int) var speed = 200
+
+var velocity = Vector2()
+
+func get_input():
+ velocity = Vector2()
+ if Input.is_action_pressed("right"):
+ velocity.x += 1
+ if Input.is_action_pressed("left"):
+ velocity.x -= 1
+ if Input.is_action_pressed("down"):
+ velocity.y += 1
+ if Input.is_action_pressed("up"):
+ velocity.y -= 1
+ velocity = velocity.normalized() * speed
+
+func _physics_process(delta):
+ get_input()
+ velocity = move_and_slide(velocity)
diff --git a/Node.gd b/Node.gd
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Node.gd
diff --git a/Node2D.tscn b/Node2D.tscn
new file mode 100644
index 0000000..c4b47a3
--- /dev/null
+++ b/Node2D.tscn
@@ -0,0 +1,20 @@
+[gd_scene load_steps=4 format=2]
+
+[ext_resource path="res://icon.png" type="Texture" id=1]
+[ext_resource path="res://KinematicBody2D.gd" type="Script" id=2]
+
+[sub_resource type="CircleShape2D" id=1]
+
+[node name="Node2D" type="Node2D"]
+position = Vector2( 46, 10 )
+
+[node name="KinematicBody2D" type="KinematicBody2D" parent="."]
+position = Vector2( 149, 52 )
+input_pickable = true
+script = ExtResource( 2 )
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
+shape = SubResource( 1 )
+
+[node name="Sprite" type="Sprite" parent="KinematicBody2D/CollisionShape2D"]
+texture = ExtResource( 1 )
diff --git a/default_env.tres b/default_env.tres
new file mode 100644
index 0000000..20207a4
--- /dev/null
+++ b/default_env.tres
@@ -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 )
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..c98fbb6
--- /dev/null
+++ b/icon.png
Binary files differ
diff --git a/icon.png.import b/icon.png.import
new file mode 100644
index 0000000..a4c02e6
--- /dev/null
+++ b/icon.png.import
@@ -0,0 +1,35 @@
+[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
+process/normal_map_invert_y=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/project.godot b/project.godot
new file mode 100644
index 0000000..4da7263
--- /dev/null
+++ b/project.godot
@@ -0,0 +1,53 @@
+; 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
+
+[application]
+
+config/name="TowerDefence"
+run/main_scene="res://Node2D.tscn"
+config/icon="res://icon.png"
+
+[gui]
+
+common/drop_mouse_on_gui_input_disabled=true
+
+[input]
+
+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,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+ ]
+}
+up={
+"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,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+ ]
+}
+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,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+ ]
+}
+down={
+"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":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+ ]
+}
+
+[physics]
+
+common/enable_pause_aware_picking=true
+
+[rendering]
+
+quality/driver/driver_name="GLES2"
+vram_compression/import_etc=true
+vram_compression/import_etc2=false
+environment/default_environment="res://default_env.tres"