diff --git a/Bullet.gd b/Bullet.gd new file mode 100644 index 0000000..5f7b88d --- /dev/null +++ b/Bullet.gd @@ -0,0 +1,7 @@ +extends KinematicBody2D + +func _ready(): + set_fixed_process(true) + +func _fixed_process(delta): + pass diff --git a/Bullet.tscn b/Bullet.tscn new file mode 100644 index 0000000..0c2a497 --- /dev/null +++ b/Bullet.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=2 format=1] + +[ext_resource path="res://Bullet.gd" type="Script" id=1] + +[node name="Bullet" type="KinematicBody2D"] + +input/pickable = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.08 +script/script = ExtResource( 1 ) + + diff --git a/EnemyGrunt.tscn b/EnemyGrunt.tscn new file mode 100644 index 0000000..8c359af --- /dev/null +++ b/EnemyGrunt.tscn @@ -0,0 +1,10 @@ +[gd_scene format=1] + +[node name="EnemyGrunt" type="KinematicBody2D"] + +input/pickable = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.08 + + diff --git a/Player.gd b/Player.gd index b3c6515..e062ea9 100644 --- a/Player.gd +++ b/Player.gd @@ -34,6 +34,16 @@ func _fixed_process(delta): mov_delta += -ship_dir elif Input.is_action_pressed("player_move_backwards"): mov_delta += ship_dir + + if Input.is_action_pressed("player_attack_primary"): + pass + elif Input.is_action_pressed("player_attack_secondary"): + pass + + if Input.is_action_pressed("player_switch_up"): + pass + elif Input.is_action_pressed("player_switch_down"): + pass sprite.set_rot(ship_dir.angle()) diff --git a/PowerStation.gd b/PowerStation.gd new file mode 100644 index 0000000..19ae36d --- /dev/null +++ b/PowerStation.gd @@ -0,0 +1,16 @@ +extends KinematicBody2D + +var rotation_speed = deg2rad(11.25) # degrees per second + +func _ready(): + var t = get_tree() + var r = t.get_root() + var n = r.get_node("Game/MinimapControl") + n.register_entity(self) + set_process(true) + +func type(): + return "PowerStation" + +func _process(delta): + self.rotate(rotation_speed * delta) \ No newline at end of file diff --git a/PowerStation.tscn b/PowerStation.tscn new file mode 100644 index 0000000..3f9af69 --- /dev/null +++ b/PowerStation.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://PowerStation.gd" type="Script" id=1] +[ext_resource path="res://raw/power_station.png" type="Texture" id=2] + +[node name="PowerStation" type="KinematicBody2D"] + +input/pickable = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.08 +script/script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] + +transform/scale = Vector2( 2, 2 ) +texture = ExtResource( 2 ) + + diff --git a/engine.cfg b/engine.cfg index 20561b9..f953ea4 100644 --- a/engine.cfg +++ b/engine.cfg @@ -7,6 +7,8 @@ icon="res://icon.png" [input] player_attack_secondary=[mbutton(0, 2)] +player_switch_up=[mbutton(0, 4)] +player_switch_down=[mbutton(0, 5)] player_move_forwards=[key(Up), key(W), jaxis(0, 2)] player_move_backwards=[key(S), key(Down), jaxis(0, 3)] player_attack_primary=[mbutton(0, 1)] diff --git a/raw/power_station.ase b/raw/power_station.ase new file mode 100644 index 0000000..53041e0 --- /dev/null +++ b/raw/power_station.ase @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec423b64d26fc631e98da5910e9f22e0e758e12836a3e6409fac3d76ecc1f6ae +size 1188 diff --git a/raw/power_station.png b/raw/power_station.png new file mode 100644 index 0000000..f01d44e Binary files /dev/null and b/raw/power_station.png differ diff --git a/raw/power_station.png.flags b/raw/power_station.png.flags new file mode 100644 index 0000000..efb2b8c --- /dev/null +++ b/raw/power_station.png.flags @@ -0,0 +1 @@ +filter=false