mirror of https://github.com/profan/ld-39-jam.git
shitty power station thing
This commit is contained in:
parent
8d72de944e
commit
669324f5c2
|
@ -0,0 +1,7 @@
|
||||||
|
extends KinematicBody2D
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
set_fixed_process(true)
|
||||||
|
|
||||||
|
func _fixed_process(delta):
|
||||||
|
pass
|
|
@ -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 )
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
10
Player.gd
10
Player.gd
|
@ -35,6 +35,16 @@ func _fixed_process(delta):
|
||||||
elif Input.is_action_pressed("player_move_backwards"):
|
elif Input.is_action_pressed("player_move_backwards"):
|
||||||
mov_delta += ship_dir
|
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())
|
sprite.set_rot(ship_dir.angle())
|
||||||
|
|
||||||
var new_vel = (ship_vel + (mov_delta * (delta * ship_accel))).clamped(ship_max_vel)
|
var new_vel = (ship_vel + (mov_delta * (delta * ship_accel))).clamped(ship_max_vel)
|
||||||
|
|
|
@ -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)
|
|
@ -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 )
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ icon="res://icon.png"
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
player_attack_secondary=[mbutton(0, 2)]
|
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_forwards=[key(Up), key(W), jaxis(0, 2)]
|
||||||
player_move_backwards=[key(S), key(Down), jaxis(0, 3)]
|
player_move_backwards=[key(S), key(Down), jaxis(0, 3)]
|
||||||
player_attack_primary=[mbutton(0, 1)]
|
player_attack_primary=[mbutton(0, 1)]
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ec423b64d26fc631e98da5910e9f22e0e758e12836a3e6409fac3d76ecc1f6ae
|
||||||
|
size 1188
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -0,0 +1 @@
|
||||||
|
filter=false
|
Loading…
Reference in New Issue