Begin better project structuring. Add settings page framework and donation links
12
BG.gd
|
@ -12,3 +12,15 @@ func _process(delta):
|
|||
$bg1.position.x = 1600
|
||||
if $bg2.position.x < -550:
|
||||
$bg2.position.x = 1600
|
||||
|
||||
if $Sun.visible == true:
|
||||
if $Sun.position.x < -2500:
|
||||
$Sun.visible = false
|
||||
$Sun.position.x = 1250
|
||||
$Sun.position.x -= delta*2.5
|
||||
|
||||
if $Orange.visible == true:
|
||||
if $Orange.position.x < -5000:
|
||||
$Orange.visible = false
|
||||
$Orange.position.x = 1600
|
||||
$Orange.position.x -= delta*1.5
|
||||
|
|
|
@ -0,0 +1,152 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://BG.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/backgrounds/SunBG.png" type="Texture" id=2]
|
||||
[ext_resource path="res://art/bg.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/backgrounds/orange.png" type="Texture" id=4]
|
||||
|
||||
[node name="BG" type="Node2D"]
|
||||
|
||||
z_index = -1
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Z Index" ]
|
||||
|
||||
[node name="CanvasModulate" type="CanvasModulate" parent="." index="0"]
|
||||
|
||||
visible = false
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
|
||||
[node name="BlackBG" type="ColorRect" parent="." index="1"]
|
||||
|
||||
light_mask = 0
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1035.0
|
||||
margin_bottom = 602.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
_sections_unfolded = [ "Anchor", "Focus", "Grow Direction", "Hint", "Margin", "Material", "Mouse", "Pause", "Rect", "Size Flags", "Theme", "Visibility" ]
|
||||
|
||||
[node name="Sun" type="Sprite" parent="." index="2"]
|
||||
|
||||
visible = false
|
||||
position = Vector2( 1250, 154.764 )
|
||||
z_index = 1
|
||||
texture = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Transform", "Z Index" ]
|
||||
|
||||
[node name="bg1" type="Sprite" parent="." index="3"]
|
||||
|
||||
editor/display_folded = true
|
||||
light_mask = 2
|
||||
position = Vector2( 577.646, 365.663 )
|
||||
scale = Vector2( 0.694364, 0.694364 )
|
||||
texture = ExtResource( 3 )
|
||||
_sections_unfolded = [ "Transform", "Visibility", "Z Index" ]
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="bg1" index="0"]
|
||||
|
||||
visible = false
|
||||
enabled = true
|
||||
editor_only = false
|
||||
texture = ExtResource( 3 )
|
||||
offset = Vector2( 0, 0 )
|
||||
texture_scale = 1.0
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
energy = 2.5
|
||||
mode = 0
|
||||
range_height = 0.0
|
||||
range_z_min = -1024
|
||||
range_z_max = 1024
|
||||
range_layer_min = 0
|
||||
range_layer_max = 0
|
||||
range_item_cull_mask = 2
|
||||
shadow_enabled = false
|
||||
shadow_color = Color( 0, 0, 0, 0 )
|
||||
shadow_buffer_size = 2048
|
||||
shadow_gradient_length = 0.0
|
||||
shadow_filter = 0
|
||||
shadow_filter_smooth = 0.0
|
||||
shadow_item_cull_mask = 2
|
||||
_sections_unfolded = [ "Range", "Shadow" ]
|
||||
|
||||
[node name="bg2" type="Sprite" parent="." index="4"]
|
||||
|
||||
editor/display_folded = true
|
||||
light_mask = 2
|
||||
position = Vector2( 1823.66, 361.868 )
|
||||
scale = Vector2( 0.6985, 0.6985 )
|
||||
texture = ExtResource( 3 )
|
||||
_sections_unfolded = [ "Transform", "Visibility", "Z Index" ]
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="bg2" index="0"]
|
||||
|
||||
visible = false
|
||||
enabled = true
|
||||
editor_only = false
|
||||
texture = ExtResource( 3 )
|
||||
offset = Vector2( 0, 0 )
|
||||
texture_scale = 1.0
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
energy = 2.5
|
||||
mode = 0
|
||||
range_height = 0.0
|
||||
range_z_min = -1024
|
||||
range_z_max = 1024
|
||||
range_layer_min = 0
|
||||
range_layer_max = 0
|
||||
range_item_cull_mask = 2
|
||||
shadow_enabled = false
|
||||
shadow_color = Color( 0, 0, 0, 0 )
|
||||
shadow_buffer_size = 2048
|
||||
shadow_gradient_length = 0.0
|
||||
shadow_filter = 0
|
||||
shadow_filter_smooth = 0.0
|
||||
shadow_item_cull_mask = 2
|
||||
_sections_unfolded = [ "Range", "Shadow" ]
|
||||
|
||||
[node name="Orange" type="Sprite" parent="." index="5"]
|
||||
|
||||
visible = false
|
||||
light_mask = 0
|
||||
position = Vector2( 1617.48, 325.617 )
|
||||
scale = Vector2( 0.694364, 0.694364 )
|
||||
texture = ExtResource( 4 )
|
||||
_sections_unfolded = [ "Material", "Transform", "Visibility", "Z Index" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="Orange" index="0"]
|
||||
|
||||
enabled = true
|
||||
editor_only = false
|
||||
texture = ExtResource( 4 )
|
||||
offset = Vector2( 0, 0 )
|
||||
texture_scale = 1.0
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
energy = 1.0
|
||||
mode = 3
|
||||
range_height = 0.0
|
||||
range_z_min = -1024
|
||||
range_z_max = 1024
|
||||
range_layer_min = 0
|
||||
range_layer_max = 0
|
||||
range_item_cull_mask = 1
|
||||
shadow_enabled = false
|
||||
shadow_color = Color( 0, 0, 0, 0 )
|
||||
shadow_buffer_size = 2048
|
||||
shadow_gradient_length = 0.0
|
||||
shadow_filter = 0
|
||||
shadow_filter_smooth = 0.0
|
||||
shadow_item_cull_mask = 1
|
||||
_sections_unfolded = [ "Transform", "Z Index" ]
|
||||
|
||||
|
4
Bad.gd
|
@ -56,4 +56,8 @@ func _process(delta):
|
|||
if velocity.length() > 0:
|
||||
velocity = velocity.normalized() * speed
|
||||
|
||||
if position.x < -100:
|
||||
emit_signal("dead", 0)
|
||||
queue_free()
|
||||
|
||||
position += velocity * delta
|
6
Bad.tscn
|
@ -1,6 +1,8 @@
|
|||
[gd_scene format=2]
|
||||
|
||||
[node name="BadClass" type="Area2D" index="0"]
|
||||
[node name="BadClass" type="Area2D" groups=[
|
||||
"enemies",
|
||||
]]
|
||||
|
||||
input_pickable = true
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
|
@ -11,7 +13,7 @@ collision_layer = 2
|
|||
collision_mask = 0
|
||||
audio_bus_override = false
|
||||
audio_bus_name = "Master"
|
||||
_sections_unfolded = [ "Collision" ]
|
||||
_sections_unfolded = [ "Audio Bus", "Collision", "Material", "Pause", "Pickable", "Transform", "Visibility", "Z Index" ]
|
||||
|
||||
[node name="CollisionBox" type="CollisionShape2D" parent="." index="0"]
|
||||
|
||||
|
|
10
Bad1.gd
|
@ -29,10 +29,6 @@ var boss = false
|
|||
var health = 50
|
||||
var hit_timer = 1000
|
||||
|
||||
func _on_Visibility_screen_exited():
|
||||
prints("bye-bye, bad bad")
|
||||
queue_free()
|
||||
|
||||
func _ready():
|
||||
connect("area_entered", self, "hit")
|
||||
pass
|
||||
|
@ -46,7 +42,7 @@ func hit(who):
|
|||
$Line2D.set_point_position( 1, health_bar )
|
||||
|
||||
if health <= 0:
|
||||
emit_signal("dead", 15)
|
||||
emit_signal("dead", 10) # was 12 # was 15
|
||||
queue_free()
|
||||
|
||||
var velocity = Vector2()
|
||||
|
@ -66,3 +62,7 @@ func _process(delta):
|
|||
velocity = velocity.normalized() * SPEED
|
||||
|
||||
position += velocity * delta
|
||||
|
||||
if position.x < -100:
|
||||
emit_signal("dead", 0)
|
||||
queue_free()
|
|
@ -19,7 +19,9 @@ animations = [ {
|
|||
custom_solver_bias = 0.0
|
||||
radius = 171.26
|
||||
|
||||
[node name="Bad1" type="Area2D"]
|
||||
[node name="Bad1" type="Area2D" groups=[
|
||||
"enemies",
|
||||
]]
|
||||
|
||||
position = Vector2( 947.34, 293.528 )
|
||||
scale = Vector2( 0.15, 0.15 )
|
||||
|
|
|
@ -29,6 +29,7 @@ var hit_timer = 1000
|
|||
var can_shoot = true
|
||||
var health_multi = 1
|
||||
var boss = false
|
||||
var independent = true
|
||||
func _on_Visibility_screen_exited():
|
||||
prints("bye-bye, bad bad")
|
||||
queue_free()
|
||||
|
@ -49,6 +50,9 @@ func _process(delta):
|
|||
if health <= 0:
|
||||
emit_signal("dead", 100)
|
||||
queue_free()
|
||||
if position.x < -100:
|
||||
emit_signal("dead", 0)
|
||||
queue_free()
|
||||
|
||||
$Rotatable.rotation_degrees += delta*fire_speed
|
||||
|
||||
|
@ -99,6 +103,8 @@ func _process(delta):
|
|||
var health_bar = Vector2(((health * 3.75) - 750), -1100)
|
||||
$Line2D.set_point_position( 1, health_bar )
|
||||
|
||||
if independent == true:
|
||||
print(independent)
|
||||
position += velocity * delta
|
||||
|
||||
func shoot():
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
[gd_scene load_steps=8 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://BadLaser.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Laser.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://art/bad/laser/bad_laser_stationary.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/bad/laser/bad_laser_rotatable.png" type="Texture" id=4]
|
||||
[ext_resource path="res://art/bad/laser/bad_laser_bg.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/bad/laser/bad_laser_stationary.png" type="Texture" id=4]
|
||||
[ext_resource path="res://art/bad/laser/bad_laser_rotatable.png" type="Texture" id=5]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "New Anim",
|
||||
"speed": 5.0
|
||||
|
@ -17,7 +18,7 @@ animations = [ {
|
|||
[sub_resource type="SpriteFrames" id=2]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"frames": [ ExtResource( 5 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
|
@ -28,7 +29,9 @@ animations = [ {
|
|||
custom_solver_bias = 0.0
|
||||
radius = 867.264
|
||||
|
||||
[node name="BadLaser" type="Area2D"]
|
||||
[node name="BadLaser" type="Area2D" groups=[
|
||||
"enemies",
|
||||
]]
|
||||
|
||||
position = Vector2( 947.34, 293.528 )
|
||||
scale = Vector2( 0.07, 0.07 )
|
||||
|
@ -39,7 +42,7 @@ gravity = 98.0
|
|||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
collision_mask = 0
|
||||
audio_bus_override = false
|
||||
audio_bus_name = "Master"
|
||||
script = ExtResource( 1 )
|
||||
|
@ -54,23 +57,30 @@ wait_time = 1.0
|
|||
one_shot = false
|
||||
autostart = false
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="1"]
|
||||
[node name="BG" type="Sprite" parent="." index="1"]
|
||||
|
||||
position = Vector2( 3.5857, 9.035 )
|
||||
scale = Vector2( 1.0195, 1.0195 )
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="." index="2"]
|
||||
|
||||
frames = SubResource( 1 )
|
||||
animation = "New Anim"
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Rotatable" type="AnimatedSprite" parent="." index="2"]
|
||||
[node name="Rotatable" type="AnimatedSprite" parent="." index="3"]
|
||||
|
||||
frames = SubResource( 2 )
|
||||
animation = "default"
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="3"]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="4"]
|
||||
|
||||
position = Vector2( 0, -14.2857 )
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="." index="4"]
|
||||
[node name="Line2D" type="Line2D" parent="." index="5"]
|
||||
|
||||
position = Vector2( 9.15527e-05, 33.3334 )
|
||||
points = PoolVector2Array( -750, -1100, 143, -1100 )
|
||||
|
|
56
BlackHole.gd
|
@ -1,48 +1,62 @@
|
|||
extends "res://Bad.gd"
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = "textvar"
|
||||
|
||||
var rot_speed = 1
|
||||
var dying = false
|
||||
var splitting = false
|
||||
|
||||
signal flash
|
||||
|
||||
func _ready():
|
||||
starting_health = 20000
|
||||
starting_health = 5000
|
||||
health = starting_health
|
||||
speed = 10
|
||||
kill_reward = 1000
|
||||
boss = true
|
||||
|
||||
var splitting = false
|
||||
|
||||
func _process(delta):
|
||||
rotation += delta*rot_speed
|
||||
if rotation > 2*PI:
|
||||
rotation = 0
|
||||
|
||||
if health < starting_health*0.88:
|
||||
$MainSprite.frame = 1
|
||||
if health < starting_health*0.76:
|
||||
$MainSprite.frame = 2
|
||||
if health < starting_health*0.64:
|
||||
$MainSprite.frame = 3
|
||||
if health < starting_health*0.52:
|
||||
$MainSprite.frame = 4
|
||||
if health < starting_health*0.40:
|
||||
$MainSprite.frame = 5
|
||||
if health < starting_health*0.28:
|
||||
$MainSprite.frame = 6
|
||||
if health < starting_health*0.16:
|
||||
$CollisionBox.disabled = true
|
||||
if dying == true:
|
||||
$TopHalf.visible = true
|
||||
$BotHalf.visible = true
|
||||
$MainSprite.visible = false
|
||||
if rotation_degrees > 45 && rotation_degrees < 70:
|
||||
if rot_speed != 0:
|
||||
emit_signal("flash")
|
||||
splitting = true
|
||||
health = 999999
|
||||
elif health < starting_health*0.16:
|
||||
dying = true
|
||||
#$CollisionBox.disabled = true
|
||||
elif health < starting_health*0.28:
|
||||
if $MainSprite.frame != 6:
|
||||
emit_signal("flash")
|
||||
$MainSprite.frame = 6
|
||||
elif health < starting_health*0.40:
|
||||
if $MainSprite.frame != 5:
|
||||
emit_signal("flash")
|
||||
$MainSprite.frame = 5
|
||||
elif health < starting_health*0.52:
|
||||
if $MainSprite.frame != 4:
|
||||
emit_signal("flash")
|
||||
$MainSprite.frame = 4
|
||||
elif health < starting_health*0.64:
|
||||
if $MainSprite.frame != 3:
|
||||
emit_signal("flash")
|
||||
$MainSprite.frame = 3
|
||||
elif health < starting_health*0.76:
|
||||
if $MainSprite.frame != 2:
|
||||
emit_signal("flash")
|
||||
$MainSprite.frame = 2
|
||||
elif health < starting_health*0.88:
|
||||
if $MainSprite.frame != 1:
|
||||
emit_signal("flash")
|
||||
$MainSprite.frame = 1
|
||||
|
||||
if splitting:
|
||||
$CollisionBox.disabled = true
|
||||
rot_speed = 0
|
||||
$TopHalf.position.y -= delta*500
|
||||
$TopHalf.position.x -= delta*250
|
||||
|
|
|
@ -49,8 +49,9 @@ animations = [ {
|
|||
|
||||
position = Vector2( 1302.7, 306.846 )
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
z_index = -1
|
||||
z_as_relative = false
|
||||
script = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Collision", "Transform" ]
|
||||
|
||||
[node name="CollisionBox" parent="." index="0"]
|
||||
|
||||
|
|
9
Bloob.gd
|
@ -44,7 +44,10 @@ var velocity = Vector2()
|
|||
|
||||
func _process(delta):
|
||||
if health <= 0:
|
||||
emit_signal("dead", 50)
|
||||
emit_signal("dead", 25) # was 40 # was 50
|
||||
queue_free()
|
||||
if position.x < -100:
|
||||
emit_signal("dead", 0)
|
||||
queue_free()
|
||||
|
||||
if hit_timer < 0.15:
|
||||
|
@ -59,7 +62,7 @@ func _process(delta):
|
|||
if velocity.length() > 0:
|
||||
velocity = velocity.normalized() * SPEED
|
||||
|
||||
# var health_bar = Vector2(((health * 3) - 157), -273)
|
||||
# $Line2D.set_point_position( 1, health_bar )
|
||||
var health_bar = Vector2(((health * 2.5) - 157), -225)
|
||||
$Line2D.set_point_position( 1, health_bar )
|
||||
|
||||
position += velocity * delta
|
|
@ -18,7 +18,9 @@ animations = [ {
|
|||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="BadBlob" type="Area2D"]
|
||||
[node name="BadBlob" type="Area2D" groups=[
|
||||
"enemies",
|
||||
]]
|
||||
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
z_index = -1
|
||||
|
@ -48,8 +50,8 @@ animation = "default"
|
|||
[node name="Line2D" type="Line2D" parent="." index="2"]
|
||||
|
||||
position = Vector2( 112, 65.3334 )
|
||||
points = PoolVector2Array( -157, -273, 143, -273 )
|
||||
width = 12.0
|
||||
points = PoolVector2Array( -157, -225, 143, -225 )
|
||||
width = 8.0
|
||||
default_color = Color( 0, 1, 0.0390625, 1 )
|
||||
texture_mode = 31
|
||||
joint_mode = 2
|
||||
|
|
After Width: | Height: | Size: 17 KiB |
4
Laser.gd
|
@ -22,6 +22,7 @@ extends Area2D
|
|||
signal hit
|
||||
|
||||
const DEFAULT_DAMAGE = 10
|
||||
const DEFAULT_FALLOFF = 1.2
|
||||
|
||||
export (int) var SPEED
|
||||
export (int) var DAMAGE
|
||||
|
@ -30,6 +31,7 @@ var current_pen = 0
|
|||
var friendly_laser = true
|
||||
var damage = DEFAULT_DAMAGE
|
||||
var boss = false
|
||||
var falloff = DEFAULT_FALLOFF
|
||||
|
||||
func _ready():
|
||||
$AnimatedSprite.play()
|
||||
|
@ -41,6 +43,8 @@ func hit(who):
|
|||
pass
|
||||
elif current_pen > 0:
|
||||
current_pen -= 1
|
||||
modulate=Color("ca4747")
|
||||
damage = damage/falloff
|
||||
else:
|
||||
hide()
|
||||
queue_free()
|
||||
|
|
|
@ -19,8 +19,9 @@ animations = [ {
|
|||
"speed": 20.0
|
||||
} ]
|
||||
|
||||
[node name="Laser" type="Area2D"]
|
||||
[node name="Laser" type="Area2D" index="0"]
|
||||
|
||||
z_as_relative = false
|
||||
input_pickable = true
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
|
@ -31,7 +32,7 @@ collision_mask = 7
|
|||
audio_bus_override = false
|
||||
audio_bus_name = "Master"
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Collision", "Z Index" ]
|
||||
_sections_unfolded = [ "Collision", "Visibility", "Z Index" ]
|
||||
SPEED = 1200
|
||||
DAMAGE = 10
|
||||
|
||||
|
|
353
Main.gd
|
@ -39,34 +39,101 @@ var player_info
|
|||
var touchy_shooty = false
|
||||
var my_info = { name = "sagethesagesage", color = "FFFFFF" }
|
||||
var mainmenu
|
||||
var current_round = 1
|
||||
|
||||
var spawning_done = false
|
||||
var not_loading = false
|
||||
|
||||
const BADDIE_WAIT_TIME_DEFAULT = 4
|
||||
|
||||
func _ready():
|
||||
# Prepare black rectangle for fading in
|
||||
$ColorRect.visible = true
|
||||
|
||||
randomize()
|
||||
|
||||
if OS.has_touchscreen_ui_hint():
|
||||
$HowTo.visible = true
|
||||
$HowTos/HowTo.visible = true
|
||||
else:
|
||||
$HowToDesktop.visible = true
|
||||
$HowTos/HowToDesktop.visible = true
|
||||
|
||||
# Launch the main menu on boot and pause the game
|
||||
mainmenu = preload("res://MainMenu.tscn").instance()
|
||||
add_child(mainmenu)
|
||||
mainmenu.connect("multiplayer_menu", self, "_open_multiplayer_menu")
|
||||
mainmenu.connect("start_game", self, "rounds")
|
||||
get_tree().paused = true
|
||||
|
||||
# Prepare timer for spawning enemies
|
||||
$BaddieTimer.wait_time = BADDIE_WAIT_TIME_DEFAULT
|
||||
$BaddieTimer.start()
|
||||
|
||||
# Seed randi for randomizing enemy spawn locations
|
||||
randomize()
|
||||
updatePoints()
|
||||
|
||||
const DEFAULT_SPAWN_SPEED = 5
|
||||
func rounds(round_number):
|
||||
$BG.visible = true
|
||||
|
||||
##### WEAKER, LESS VALUABLE ENEMIES, AT HIGHER VOLUME, MAY BE MORE ENGAGING
|
||||
|
||||
# health, time, bad1s, badblobs, badlasers, badprisons
|
||||
match round_number:
|
||||
1:
|
||||
roundOfEnemies(.6,DEFAULT_SPAWN_SPEED*.75,5,0,0,0) # default
|
||||
#roundOfEnemies(0.1,DEFAULT_SPAWN_SPEED,1,0,0,0)
|
||||
rpc("set_wave_name", "Wave 1: Learning to fly")
|
||||
2:
|
||||
roundOfEnemies(.6,DEFAULT_SPAWN_SPEED*.75,4,1,0,0)
|
||||
#if get_tree().is_network_server() == true:
|
||||
# rpc("bossMode", 1)
|
||||
#else:
|
||||
# bossMode(1)
|
||||
rpc("set_wave_name", "Wave 2: Any colour you like")
|
||||
3:
|
||||
roundOfEnemies(.6,DEFAULT_SPAWN_SPEED*.75,8,2,0,0)
|
||||
rpc("set_wave_name", "Wave 3: Money")
|
||||
4:
|
||||
roundOfEnemies(.6,DEFAULT_SPAWN_SPEED*.75,12,3,1,0)
|
||||
rpc("set_wave_name", "Wave 4: YOU CAN BLOCK ENEMY LASERS WITH YOUR SHIP")
|
||||
5:
|
||||
roundOfEnemies(.6,DEFAULT_SPAWN_SPEED*.5,15,3,0,0)
|
||||
rpc("set_wave_name", "Wave 5: One of These Days")
|
||||
6:
|
||||
roundOfEnemies(.7,DEFAULT_SPAWN_SPEED*.5,18,6,1,0)
|
||||
rpc("set_wave_name", "Wave 6: Seamus")
|
||||
7:
|
||||
roundOfEnemies(.8,DEFAULT_SPAWN_SPEED*.5,21,7,1,0)
|
||||
rpc("set_wave_name", "Wave 7: ")
|
||||
8:
|
||||
roundOfEnemies(.8,DEFAULT_SPAWN_SPEED*.75/(8/4),20,6,0,floor(8/8))
|
||||
rpc("set_wave_name", "Wave 8: Free Four")
|
||||
9:
|
||||
roundOfEnemies(.9, DEFAULT_SPAWN_SPEED*(0.5), 9*3, 9, floor(9/4), floor(9/8))
|
||||
rpc("set_wave_name", str("Wave 9"))
|
||||
10:
|
||||
rpc("set_wave_name", "Wave 10: What do you want from me?")
|
||||
if get_tree().is_network_server() == true:
|
||||
rpc("bossMode", 0)
|
||||
else:
|
||||
bossMode(0)
|
||||
11:
|
||||
roundOfEnemies(1,DEFAULT_SPAWN_SPEED*.75/(11/4),11*3,11,floor(11/4),floor(11/8))
|
||||
$WaveLabel.text = str("Wave ", 11)
|
||||
$BG/Sun.visible = true
|
||||
15:
|
||||
rpc("set_wave_name", "Wave 15: Eclipse")
|
||||
if get_tree().is_network_server() == true:
|
||||
rpc("bossMode", 1)
|
||||
else:
|
||||
bossMode(1)
|
||||
20:
|
||||
roundOfEnemies((1+(20-11)/10), (DEFAULT_SPAWN_SPEED*(0.5)), 20*3, 20, floor(20/4), floor(20/8))
|
||||
$BG/Orange.visible = true
|
||||
var roundNo:
|
||||
############### health ##### spawn speed #################### bad1s#### blobs # lasers ######### prisons ######
|
||||
roundOfEnemies((1+(roundNo-11)/10), (DEFAULT_SPAWN_SPEED*(0.5)), roundNo*3, roundNo, floor(roundNo/4), floor(roundNo/8))
|
||||
rpc("set_wave_name", str("Wave ", roundNo))
|
||||
|
||||
### Wave names ###
|
||||
### on rectangle's return: The Hero's Return
|
||||
### on Black boss appearance: Eclipse
|
||||
|
||||
sync func set_wave_name(name):
|
||||
$WaveLabel.text = str(name)
|
||||
|
||||
# Open the multiplayer section of the menu and pause the game
|
||||
func _open_multiplayer_menu():
|
||||
|
@ -95,15 +162,13 @@ func _process(delta):
|
|||
if Input.is_action_pressed("ui_accept"):
|
||||
_on_HideHowTo_pressed()
|
||||
|
||||
# Constantly update point display
|
||||
updatePoints()
|
||||
|
||||
# If you're in multiplayer,
|
||||
if get_tree().has_network_peer():
|
||||
# and not the host
|
||||
if !get_tree().is_network_server():
|
||||
# Stop spawning bads
|
||||
$BaddieTimer.stop()
|
||||
#$BaddieTimer.stop()
|
||||
pass
|
||||
|
||||
if (touchy_feely && (abs(touchy_feely.position.x - $Player.position.x) > 1)):
|
||||
if (touchy_feely.position.x < 800):
|
||||
|
@ -119,11 +184,12 @@ func _process(delta):
|
|||
if rectangle_opacity <= 0:
|
||||
booting = false
|
||||
$ColorRect.visible = false
|
||||
$Music.playing = true
|
||||
|
||||
# Flash the screen white
|
||||
if screen_flashing == true:
|
||||
$ColorRect.color = Color(1, 1, 1, rectangle_opacity)
|
||||
rectangle_opacity -= delta/4
|
||||
rectangle_opacity -= delta/3
|
||||
if rectangle_opacity <= 0:
|
||||
screen_flashing = false
|
||||
$ColorRect.visible = false
|
||||
|
@ -132,66 +198,94 @@ func _process(delta):
|
|||
func _on_bad_death(kill_money):
|
||||
# Give players appropriate money
|
||||
$Player.money += kill_money
|
||||
updatePoints()
|
||||
|
||||
print(current_round)
|
||||
|
||||
if get_tree().is_network_server() || not get_tree().has_network_peer():
|
||||
if get_tree().get_nodes_in_group("enemies").size() == 1 && spawning_done == true:
|
||||
rpc("openPlayerMenu")
|
||||
current_round +=1
|
||||
|
||||
sync func openPlayerMenu():
|
||||
$Player.upgradeMenu()
|
||||
|
||||
func startNextRound():
|
||||
if get_tree().is_network_server() || not get_tree().has_network_peer():
|
||||
rounds(current_round)
|
||||
|
||||
func roundOfEnemies(bad_health_multi, spawn_time, bad1s, badblobs, badlasers, badprisons):
|
||||
spawning_done = false
|
||||
# each enemy type comes in as an integer
|
||||
# randomly dole out enemies until each is at 0
|
||||
yield(get_tree().create_timer(1), "timeout")
|
||||
var enemiesToBeSpawned = bad1s+badblobs+badlasers+badprisons
|
||||
if enemiesToBeSpawned == 0:
|
||||
return false
|
||||
|
||||
var bad_type
|
||||
var badposition = Vector2()
|
||||
|
||||
while enemiesToBeSpawned > 0:
|
||||
var nextEnemy = randi()%5
|
||||
if (nextEnemy == 0 || nextEnemy == 4) && bad1s > 0 && get_tree().paused == false:
|
||||
bad_type = 0
|
||||
bad1s -= 1
|
||||
yield(get_tree().create_timer(spawn_time), "timeout")
|
||||
elif (nextEnemy == 1) && badblobs > 0 && get_tree().paused == false:
|
||||
bad_type = 1
|
||||
badblobs -= 1
|
||||
yield(get_tree().create_timer(spawn_time), "timeout")
|
||||
elif (nextEnemy == 2) && badlasers > 0 && get_tree().paused == false:
|
||||
bad_type = 2
|
||||
badlasers -= 1
|
||||
yield(get_tree().create_timer(spawn_time), "timeout")
|
||||
elif (nextEnemy == 3) && badprisons > 0 && get_tree().paused == false:
|
||||
bad_type = 3
|
||||
badprisons -= 1
|
||||
yield(get_tree().create_timer(spawn_time), "timeout")
|
||||
else: bad_type = 50000
|
||||
|
||||
enemiesToBeSpawned = bad1s+badblobs+badlasers+badprisons
|
||||
|
||||
if get_tree().paused == true:
|
||||
yield(get_tree().create_timer(1), "timeout")
|
||||
|
||||
if bad_type < 50000:
|
||||
badposition.x = 1100
|
||||
badposition.y = (randi()%410) + 50
|
||||
rpc("spawnBad", bad_type, badposition, bad_health_multi)
|
||||
|
||||
spawning_done = true
|
||||
#$Player.upgradeMenu()
|
||||
|
||||
func upgradeTurret(position):
|
||||
print("upgradeTurret()")
|
||||
rpc("remoteUpgradeTurret", position)
|
||||
|
||||
####################
|
||||
# UPGRADE A TURRET #
|
||||
remote func remoteUpgradeTurret(position):
|
||||
for child in get_children():
|
||||
if "turret" in child.get_name():
|
||||
print("turret")
|
||||
if child.position == position:
|
||||
child.upgradeTurret()
|
||||
#child.damage = damage
|
||||
#child.get_node("Range").scale = t_range
|
||||
#child.get_node("ReloadTimer").wait_time = reload_time
|
||||
print(child.damage, child.get_node("Range").scale, child.get_node("ReloadTimer").wait_time)
|
||||
break
|
||||
# UPGRADE A TURRET #
|
||||
####################
|
||||
|
||||
|
||||
#########################
|
||||
# ENEMY SPAWNING SCRIPT #
|
||||
#########################
|
||||
var a_round_of_bads = 50
|
||||
var sendblob = 1
|
||||
var bad_health_multi = 1.5
|
||||
var total_bads_spawned = 0
|
||||
func BaddieTimer():
|
||||
#if total_bads_spawned%6 == 0: # 75 default
|
||||
# if get_tree().is_network_server():
|
||||
# total_bads_spawned += 1
|
||||
# rpc("bossMode")
|
||||
# else:
|
||||
# total_bads_spawned += 1
|
||||
# bossMode()
|
||||
#
|
||||
if bads_this_round <= a_round_of_bads && bad_spawning_enabled:
|
||||
var bad_type
|
||||
var badposition = Vector2()
|
||||
|
||||
if sendblob%6 == 0:
|
||||
if get_tree().is_network_server():
|
||||
total_bads_spawned += 1
|
||||
sendblob += 1
|
||||
rpc("bossMode")
|
||||
else:
|
||||
total_bads_spawned += 1
|
||||
sendblob += 1
|
||||
bossMode()
|
||||
else:
|
||||
if sendblob%50 == 0:
|
||||
bad_type = 3
|
||||
sendblob += 1
|
||||
elif sendblob%20 == 0:
|
||||
bad_type = 2
|
||||
sendblob += 1
|
||||
elif sendblob%5 == 0:
|
||||
bad_type = 1
|
||||
sendblob += 1
|
||||
else:
|
||||
bad_type = 0
|
||||
sendblob += 1
|
||||
|
||||
bads_this_round += 1
|
||||
if $BaddieTimer.wait_time > 1:
|
||||
$BaddieTimer.wait_time = $BaddieTimer.wait_time * 0.99
|
||||
if bads_this_round == a_round_of_bads:
|
||||
bad_health_multi *= 1.5
|
||||
|
||||
badposition.x = 1200
|
||||
badposition.y = (randi()%410) + 50
|
||||
if get_tree().is_network_server():
|
||||
rpc("spawnBad", bad_type, badposition, bad_health_multi)
|
||||
else:
|
||||
spawnBad(bad_type, badposition, bad_health_multi)
|
||||
else:
|
||||
bads_this_round = 0
|
||||
|
||||
sync func spawnBad(bad_type, position, health_multi):
|
||||
sync func spawnBad(bad_type, badposition, health_multi):
|
||||
var bad
|
||||
if bad_type == 0:
|
||||
bad = FirstBad.instance()
|
||||
|
@ -205,43 +299,52 @@ sync func spawnBad(bad_type, position, health_multi):
|
|||
# Increase BG speed with each enemy spawned
|
||||
$BG.fly_speed *= 1.01
|
||||
|
||||
# Add one to total of enemies spawned
|
||||
total_bads_spawned += 1
|
||||
|
||||
add_child(bad)
|
||||
bad.connect("dead", self, "_on_bad_death")
|
||||
if bad_type == 3:
|
||||
bad.connect("health_up", self, "_on_health_up")
|
||||
bad.health_multi = health_multi
|
||||
bad.position = position
|
||||
bad.position = badposition
|
||||
|
||||
func _on_health_up(hp_increase):
|
||||
$Mothership.health += hp_increase
|
||||
$Mothership._update_health_bar()
|
||||
|
||||
func _on_PauseButton_pressed():
|
||||
$Player.upgradeMenu()
|
||||
$Player.pauseMenu()
|
||||
$ColorRect.visible = false
|
||||
|
||||
func updatePoints():
|
||||
$MoneyDisplay.text = str($Player.money, " points")
|
||||
|
||||
func _on_Player_update_display():
|
||||
updatePoints()
|
||||
$MoneyDisplay.text = str("$", $Player.money)
|
||||
#$MoneyDisplay.text = str($Player.money, " points")
|
||||
|
||||
func _on_Mothership_game_over():
|
||||
$ShootButton.visible = false
|
||||
for child in self.get_children():
|
||||
print(child, child.name)
|
||||
if ("Bad" in child.name):
|
||||
child.queue_free()
|
||||
elif (child.has_method("bossHealth")):
|
||||
child.queue_free()
|
||||
$Player.gameOver()
|
||||
|
||||
func _on_Player_restart_game():
|
||||
print("_on_Player_restart_game()")
|
||||
"""
|
||||
for child in self.get_children():
|
||||
if (child.has_method("_on_Visibility_screen_exited")):
|
||||
print(child, child.name)
|
||||
if ("Bad" in child.name):
|
||||
child.queue_free()
|
||||
if (child.has_method("bossHealth")):
|
||||
child.queue_free()
|
||||
bads_this_round = 0
|
||||
total_bads_spawned = 0
|
||||
$BaddieTimer.wait_time = BADDIE_WAIT_TIME_DEFAULT
|
||||
$ShootButton.visible = true
|
||||
elif (child.has_method("bossHealth")):
|
||||
child.queue_free()"""
|
||||
current_round = 1
|
||||
spawning_done = true
|
||||
updatePoints()
|
||||
if get_tree().is_network_server() || not get_tree().has_network_peer():
|
||||
rpc("hideGameOver")
|
||||
rpc("openPlayerMenu")
|
||||
|
||||
remote func hideGameOver():
|
||||
$Player.restart_game()
|
||||
|
||||
var touchy_feely
|
||||
|
||||
|
@ -249,10 +352,9 @@ var touchscreen_on = false
|
|||
func _input(event):
|
||||
if (event is InputEventScreenTouch || event is InputEventScreenDrag):
|
||||
touchscreen_on = true
|
||||
if event.position.x < 800: #&& (abs (event.position.y - $Player.position.y) < 100) :
|
||||
if event.position.x < 800:
|
||||
$Player.position.x = event.position.x + 100*(event.position.x/800)
|
||||
$Player.position.y = event.position.y - 100
|
||||
prints(event.index)
|
||||
else:
|
||||
touchy_shooty = true
|
||||
|
||||
|
@ -260,6 +362,12 @@ func other_shooting_upgrade(id, other_bullet_delay):
|
|||
prints("Other player shooting speed upgrade")
|
||||
get_node(str(id)).timer.set_wait_time(other_bullet_delay)
|
||||
|
||||
func other_damage_upgrade(id, other_laser_damage):
|
||||
get_node(str(id)).laser_damage = other_laser_damage
|
||||
|
||||
func other_laser_penetration_upgrade(id, other_laser_penetration):
|
||||
get_node(str(id)).laser_penetration = other_laser_penetration
|
||||
|
||||
func other_ship_color_change(id, other_color):
|
||||
prints("Other player color change")
|
||||
get_node(str(id)).modulate(other_color)
|
||||
|
@ -271,34 +379,31 @@ func double_laser_upgrade(id):
|
|||
# Show other player's movement
|
||||
func _on_Player_multiplayer_movement(id, pos, other_is_shooting):
|
||||
get_node(str(id)).position = pos
|
||||
|
||||
if other_is_shooting:
|
||||
get_node(str(id)).shoot()
|
||||
get_node(str(id)).is_shooting = other_is_shooting
|
||||
|
||||
# BOSS MODE #
|
||||
# Disable enemy spawning
|
||||
# Wait a few seconds for enemies to clear
|
||||
# Call for boss launch
|
||||
var bosstimer = null
|
||||
sync func bossMode():
|
||||
sync func bossMode(boss_type):
|
||||
prints("bossMode()")
|
||||
bad_spawning_enabled = false
|
||||
bosstimer = Timer.new()
|
||||
bosstimer.connect("timeout",self,"_launch_boss")
|
||||
"""bosstimer.connect("timeout",self,"_launch_boss", boss_type)
|
||||
add_child(bosstimer) #to process
|
||||
bosstimer.wait_time = 15
|
||||
bosstimer.wait_time = 3
|
||||
bosstimer.one_shot = true
|
||||
bosstimer.start() #to start
|
||||
bosstimer.start() #to start"""
|
||||
yield(get_tree().create_timer(3), "timeout")
|
||||
|
||||
# Spawn the first boss
|
||||
func _launch_boss():
|
||||
prints("_launch_boss()")
|
||||
|
||||
prints("_launch_boss(",boss_type,")")
|
||||
var bad
|
||||
var which_boss = randi()%2
|
||||
if which_boss == 0:
|
||||
if boss_type == 0:
|
||||
bad = RectangleBoss.instance()
|
||||
elif which_boss == 1:
|
||||
elif boss_type == 1:
|
||||
bad = BlackHole.instance()
|
||||
$Music.volume_db = -20
|
||||
add_child(bad)
|
||||
|
||||
# Flash screen when signalled
|
||||
|
@ -310,7 +415,28 @@ func _launch_boss():
|
|||
|
||||
# Get boss health
|
||||
bad.connect("boss_health", self, "getBossHealth")
|
||||
"""
|
||||
# Spawn the first boss
|
||||
func _launch_boss(boss_type):
|
||||
prints("_launch_boss(",boss_type,")")
|
||||
var bad
|
||||
if boss_type == 0:
|
||||
bad = RectangleBoss.instance()
|
||||
elif boss_type == 1:
|
||||
bad = BlackHole.instance()
|
||||
$Music.volume_db = -20
|
||||
add_child(bad)
|
||||
|
||||
# Flash screen when signalled
|
||||
bad.connect("flash", self, "_flash_screen")
|
||||
bad.show_behind_parent = true
|
||||
|
||||
# Boss death functions the same as regular death
|
||||
bad.connect("dead", self, "_on_boss_death")
|
||||
|
||||
# Get boss health
|
||||
bad.connect("boss_health", self, "getBossHealth")
|
||||
"""
|
||||
func getBossHealth(currentHealth, totalHealth):
|
||||
totalHealth = float(totalHealth)
|
||||
var health_bar = Vector2(((currentHealth/totalHealth)*800)+100, 50)
|
||||
|
@ -324,8 +450,12 @@ func getBossHealth(currentHealth, totalHealth):
|
|||
func _on_boss_death(kill_money):
|
||||
# Give players appropriate money, and restart spawns
|
||||
$Player.money += kill_money
|
||||
updatePoints()
|
||||
bad_spawning_enabled = true
|
||||
bosstimer.stop()
|
||||
rpc("openPlayerMenu")
|
||||
current_round +=1
|
||||
$Music.volume_db = 0
|
||||
|
||||
# Begins screen-flashing process
|
||||
func _flash_screen():
|
||||
|
@ -337,7 +467,6 @@ func _flash_screen():
|
|||
func _load_players(id, info):
|
||||
player_info = info
|
||||
prints("_load_players", player_info)
|
||||
#prints(player_info[id].name, "YEET", player_info[id].color)
|
||||
|
||||
func _start_multiplayer_game():
|
||||
print(player_info)
|
||||
|
@ -348,15 +477,23 @@ func _start_multiplayer_game():
|
|||
player.set_name(str(peer_id))
|
||||
prints(str(peer_id), "yeetert")
|
||||
add_child(player)
|
||||
#get_node("/").add_child(player)
|
||||
player.setUsername(player_info[peer_id].name)
|
||||
#$MultiplayerTimer.start()
|
||||
if get_tree().is_network_server():
|
||||
rounds(1)
|
||||
|
||||
func _on_HideHowTo_pressed():
|
||||
$HowTo.visible = false
|
||||
$HowToDesktop.visible = false
|
||||
$HideHowTo.visible = false
|
||||
$HowTos.visible = false
|
||||
|
||||
func _on_Player_other_ship_enable_rainbow(id):
|
||||
prints("Other player entered rainbow mode")
|
||||
get_node(str(id)).enable_the_rainbow()
|
||||
|
||||
func _on_Player_buy_turret(id, turret_position):
|
||||
print("Main:buyTurret", turret_position)
|
||||
var turret = preload("res://Turret.tscn").instance()
|
||||
turret.connect("upgrade_turret", self, "upgradeTurret")
|
||||
turret.set_name(str(id,"turret"))
|
||||
add_child(turret)
|
||||
turret.position = turret_position
|
||||
turret.scale.x = 0.25
|
||||
turret.scale.y = 0.25
|
256
Main.tscn
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=20 format=2]
|
||||
[gd_scene load_steps=21 format=2]
|
||||
|
||||
[ext_resource path="res://Main.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Bad1.tscn" type="PackedScene" id=2]
|
||||
|
@ -7,22 +7,23 @@
|
|||
[ext_resource path="res://Prison.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://RectangleBoss.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://BlackHole.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://BG.gd" type="Script" id=8]
|
||||
[ext_resource path="res://art/bg.png" type="Texture" id=9]
|
||||
[ext_resource path="res://Player.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://Mothership.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://BG.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://Player.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://Mothership.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://art/hand-numbs.ttf" type="DynamicFontData" id=11]
|
||||
[ext_resource path="res://OtherPlayer.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://art/interface/how_to.png" type="Texture" id=13]
|
||||
[ext_resource path="res://art/interface/how_to_desktop.png" type="Texture" id=14]
|
||||
[ext_resource path="res://art/interface/pause.png" type="Texture" id=15]
|
||||
[ext_resource path="res://art/interface/pause.png" type="Texture" id=13]
|
||||
[ext_resource path="res://art/interface/how_to.png" type="Texture" id=14]
|
||||
[ext_resource path="res://art/interface/how_to_desktop.png" type="Texture" id=15]
|
||||
[ext_resource path="res://main_bg.ogg" type="AudioStream" id=16]
|
||||
|
||||
[sub_resource type="ImageTexture" id=1]
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
|
||||
flags = 7
|
||||
storage = 0
|
||||
lossy_quality = 0.7
|
||||
flags = 7
|
||||
size = Vector2( 0, 0 )
|
||||
size = 28
|
||||
use_mipmaps = false
|
||||
use_filter = false
|
||||
font_data = ExtResource( 11 )
|
||||
_sections_unfolded = [ "Font", "Settings" ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=2]
|
||||
|
||||
|
@ -51,7 +52,7 @@ animations = [ {
|
|||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="Main" type="Node" index="0"]
|
||||
[node name="Main" type="Node"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Pause" ]
|
||||
|
@ -62,75 +63,45 @@ Prison = ExtResource( 5 )
|
|||
RectangleBoss = ExtResource( 6 )
|
||||
BlackHole = ExtResource( 7 )
|
||||
|
||||
[node name="BG" type="Node2D" parent="." index="0"]
|
||||
[node name="BG" parent="." index="0" instance=ExtResource( 8 )]
|
||||
|
||||
z_index = -1
|
||||
script = ExtResource( 8 )
|
||||
_sections_unfolded = [ "Z Index" ]
|
||||
[node name="Player" parent="." index="1" instance=ExtResource( 9 )]
|
||||
|
||||
[node name="bg1" type="Sprite" parent="BG" index="0"]
|
||||
|
||||
position = Vector2( 577.646, 365.663 )
|
||||
scale = Vector2( 0.694364, 0.694364 )
|
||||
texture = ExtResource( 9 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="bg2" type="Sprite" parent="BG" index="1"]
|
||||
|
||||
position = Vector2( 1823.66, 361.868 )
|
||||
scale = Vector2( 0.6985, 0.6985 )
|
||||
texture = ExtResource( 9 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="." index="1"]
|
||||
|
||||
visible = false
|
||||
z_index = -5
|
||||
texture = SubResource( 1 )
|
||||
_sections_unfolded = [ "Z Index" ]
|
||||
|
||||
[node name="Player" parent="." index="2" instance=ExtResource( 10 )]
|
||||
|
||||
[node name="BaddieTimer" type="Timer" parent="." index="3"]
|
||||
|
||||
process_mode = 1
|
||||
wait_time = 2.0
|
||||
one_shot = false
|
||||
autostart = false
|
||||
|
||||
[node name="Mothership" parent="." index="4" instance=ExtResource( 11 )]
|
||||
[node name="Mothership" parent="." index="2" instance=ExtResource( 10 )]
|
||||
|
||||
position = Vector2( 18.327, 304.835 )
|
||||
|
||||
[node name="MoneyDisplay" type="Label" parent="." index="5"]
|
||||
[node name="MoneyDisplay" type="Label" parent="." index="3"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 913.0
|
||||
margin_top = 536.0
|
||||
margin_top = 557.0
|
||||
margin_right = 1006.0
|
||||
margin_bottom = 571.0
|
||||
margin_bottom = 592.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
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
||||
text = "$0"
|
||||
align = 2
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "Size Flags", "custom_fonts" ]
|
||||
_sections_unfolded = [ "Size Flags", "custom_colors", "custom_fonts" ]
|
||||
|
||||
[node name="OtherPlayer" parent="." index="6" instance=ExtResource( 12 )]
|
||||
[node name="OtherPlayer" parent="." index="4" instance=ExtResource( 12 )]
|
||||
|
||||
visible = false
|
||||
_sections_unfolded = [ "Material", "Transform", "Visibility" ]
|
||||
|
||||
[node name="BossHealth" type="Line2D" parent="." index="7"]
|
||||
[node name="BossHealth" type="Line2D" parent="." index="5"]
|
||||
|
||||
points = PoolVector2Array( 100, 50, 900, 50 )
|
||||
width = 15.0
|
||||
|
@ -139,7 +110,7 @@ texture_mode = 31
|
|||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." index="8"]
|
||||
[node name="ColorRect" type="ColorRect" parent="." index="6"]
|
||||
|
||||
visible = false
|
||||
anchor_left = 0.0
|
||||
|
@ -157,91 +128,73 @@ size_flags_vertical = 1
|
|||
color = Color( 0, 0, 0, 1 )
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
|
||||
[node name="HowTo" type="AnimatedSprite" parent="." index="9"]
|
||||
[node name="Pausing" type="Node2D" parent="." index="7"]
|
||||
|
||||
editor/display_folded = true
|
||||
position = Vector2( 940, 36 )
|
||||
|
||||
[node name="Pause" type="AnimatedSprite" parent="Pausing" index="0"]
|
||||
|
||||
position = Vector2( 32.128, 31.044 )
|
||||
scale = Vector2( 0.199771, 0.199771 )
|
||||
frames = SubResource( 2 )
|
||||
animation = "default"
|
||||
|
||||
[node name="PauseButton" type="Button" parent="Pausing" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 61.0
|
||||
margin_bottom = 64.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="HowTos" type="Node2D" parent="." index="8"]
|
||||
|
||||
editor/display_folded = true
|
||||
_sections_unfolded = [ "Visibility", "Z Index" ]
|
||||
|
||||
[node name="HowTo" type="AnimatedSprite" parent="HowTos" index="0"]
|
||||
|
||||
visible = false
|
||||
position = Vector2( 482.397, 299.674 )
|
||||
scale = Vector2( 0.42077, 0.42077 )
|
||||
frames = SubResource( 2 )
|
||||
animation = "default"
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
|
||||
[node name="HowToDesktop" type="AnimatedSprite" parent="." index="10"]
|
||||
|
||||
visible = false
|
||||
position = Vector2( 482, 300 )
|
||||
scale = Vector2( 0.42, 0.42 )
|
||||
frames = SubResource( 3 )
|
||||
animation = "default"
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
|
||||
[node name="ShootButton" type="Button" parent="." index="11"]
|
||||
[node name="HowToDesktop" type="AnimatedSprite" parent="HowTos" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 785.0
|
||||
margin_top = 269.0
|
||||
margin_right = 1022.0
|
||||
margin_bottom = 599.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
disabled = true
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
_sections_unfolded = [ "Theme" ]
|
||||
|
||||
[node name="PauseButton" type="Button" parent="." index="12"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 940.0
|
||||
margin_top = 36.0
|
||||
margin_right = 1001.0
|
||||
margin_bottom = 100.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Pause" type="AnimatedSprite" parent="." index="13"]
|
||||
|
||||
position = Vector2( 972.128, 67.044 )
|
||||
scale = Vector2( 0.199771, 0.199771 )
|
||||
visible = false
|
||||
position = Vector2( 482, 300 )
|
||||
scale = Vector2( 0.42, 0.42 )
|
||||
frames = SubResource( 4 )
|
||||
animation = "default"
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
|
||||
[node name="HideHowTo" type="Button" parent="." index="14"]
|
||||
[node name="HideHowTo" type="Button" parent="HowTos" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -50.0
|
||||
margin_top = -15.0
|
||||
margin_right = 1044.0
|
||||
margin_bottom = 623.0
|
||||
margin_left = -55.0
|
||||
margin_top = -29.0
|
||||
margin_right = 1039.0
|
||||
margin_bottom = 609.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
|
@ -258,36 +211,69 @@ flat = true
|
|||
align = 1
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
|
||||
[node name="WaveLabel" type="Label" parent="." index="9"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 61.0
|
||||
margin_top = 19.0
|
||||
margin_right = 108.0
|
||||
margin_bottom = 33.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
|
||||
text = "Wave 1"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="Music" type="AudioStreamPlayer" parent="." index="10"]
|
||||
|
||||
stream = ExtResource( 16 )
|
||||
volume_db = 0.0
|
||||
autoplay = false
|
||||
mix_target = 0
|
||||
bus = "Master"
|
||||
|
||||
[connection signal="body_entered" from="Player" to="Player" method="_on_Player_body_entered"]
|
||||
|
||||
[connection signal="buy_turret" from="Player" to="." method="_on_Player_buy_turret"]
|
||||
|
||||
[connection signal="double_laser_upgrade" from="Player" to="." method="double_laser_upgrade"]
|
||||
|
||||
[connection signal="multiplayer_movement" from="Player" to="." method="_on_Player_multiplayer_movement"]
|
||||
|
||||
[connection signal="other_damage_upgrade" from="Player" to="." method="other_damage_upgrade"]
|
||||
|
||||
[connection signal="other_laser_penetration_upgrade" from="Player" to="." method="other_laser_penetration_upgrade"]
|
||||
|
||||
[connection signal="other_ship_color_change" from="Player" to="." method="other_ship_color_change"]
|
||||
|
||||
[connection signal="other_ship_enable_rainbow" from="Player" to="." method="_on_Player_other_ship_enable_rainbow"]
|
||||
|
||||
[connection signal="other_shooting_upgrade" from="Player" to="." method="other_shooting_upgrade"]
|
||||
|
||||
[connection signal="restart_game" from="Player" to="Mothership" method="_on_Player_restart_game"]
|
||||
|
||||
[connection signal="restart_game" from="Player" to="." method="_on_Player_restart_game"]
|
||||
|
||||
[connection signal="update_display" from="Player" to="." method="_on_Player_update_display"]
|
||||
[connection signal="restart_game" from="Player" to="Mothership" method="_on_Player_restart_game"]
|
||||
|
||||
[connection signal="timeout" from="BaddieTimer" to="." method="BaddieTimer"]
|
||||
[connection signal="start_next_round" from="Player" to="." method="startNextRound"]
|
||||
|
||||
[connection signal="update_display" from="Player" to="." method="updatePoints"]
|
||||
|
||||
[connection signal="upgrade_turret_range" from="Player" to="." method="upgradeTurretRange"]
|
||||
|
||||
[connection signal="body_shape_entered" from="Mothership" to="Mothership" method="_on_Mothership_body_shape_entered"]
|
||||
|
||||
[connection signal="game_over" from="Mothership" to="." method="_on_Mothership_game_over"]
|
||||
|
||||
[connection signal="button_down" from="ShootButton" to="Player" method="shootDown"]
|
||||
[connection signal="pressed" from="Pausing/PauseButton" to="." method="_on_PauseButton_pressed"]
|
||||
|
||||
[connection signal="button_up" from="ShootButton" to="Player" method="shootUp"]
|
||||
|
||||
[connection signal="pressed" from="PauseButton" to="." method="_on_PauseButton_pressed"]
|
||||
|
||||
[connection signal="pressed" from="HideHowTo" to="." method="_on_HideHowTo_pressed"]
|
||||
[connection signal="pressed" from="HowTos/HideHowTo" to="." method="_on_HideHowTo_pressed"]
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
extends Node
|
||||
|
||||
signal multiplayer_menu
|
||||
signal start_game
|
||||
|
||||
var clockwise = false
|
||||
var rotation_multiplier = 1
|
||||
|
@ -73,7 +74,12 @@ func _process(delta):
|
|||
|
||||
func _on_Button_pressed():
|
||||
#$Button.visible = false
|
||||
emit_signal("start_game", 1)
|
||||
now_quitting = true
|
||||
|
||||
func _on_Multiplayer_pressed():
|
||||
emit_signal("multiplayer_menu")
|
||||
|
||||
func _on_Settings_pressed():
|
||||
var settings = preload("res://Menus/Settings.tscn").instance()
|
||||
add_child(settings)
|
|
@ -33,7 +33,7 @@ animations = [ {
|
|||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="Node" type="Node"]
|
||||
[node name="Node" type="Node" index="0"]
|
||||
|
||||
pause_mode = 2
|
||||
script = ExtResource( 1 )
|
||||
|
@ -139,10 +139,36 @@ size_flags_vertical = 1
|
|||
color = Color( 0, 0, 0, 0 )
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
|
||||
[node name="Settings" type="Node2D" parent="." index="7"]
|
||||
[node name="Settings?" type="Node2D" parent="." index="7"]
|
||||
|
||||
[node name="Settings" type="Button" parent="." index="8"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 650.0
|
||||
margin_top = 400.0
|
||||
margin_right = 850.0
|
||||
margin_bottom = 570.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[connection signal="pressed" from="StartEndlessMode" to="." method="_on_Button_pressed"]
|
||||
|
||||
[connection signal="pressed" from="Multiplayer" to="." method="_on_Multiplayer_pressed"]
|
||||
|
||||
[connection signal="pressed" from="Settings" to="." method="_on_Settings_pressed"]
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
extends Node
|
||||
|
||||
func _ready():
|
||||
# Called every time the node is added to the scene.
|
||||
# Initialization here
|
||||
pass
|
||||
|
||||
func _on_BackButton_pressed():
|
||||
queue_free()
|
|
@ -0,0 +1,19 @@
|
|||
extends Node2D
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = "textvar"
|
||||
|
||||
func _ready():
|
||||
# Called every time the node is added to the scene.
|
||||
# Initialization here
|
||||
pass
|
||||
|
||||
func _on_BackButton_pressed():
|
||||
queue_free()
|
||||
|
||||
func _on_PatreonLink_pressed():
|
||||
OS.shell_open("https://www.patreon.com/fronter")
|
||||
|
||||
func _on_LiberaLink_pressed():
|
||||
OS.shell_open("https://www.liberapay.com/fronter")
|
|
@ -0,0 +1,59 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Menus/Menu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/menu/back.png" type="Texture" id=2]
|
||||
|
||||
[node name="Menu" type="Node2D"]
|
||||
|
||||
z_index = 1
|
||||
z_as_relative = false
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Z Index" ]
|
||||
|
||||
[node name="BG" type="ColorRect" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
_sections_unfolded = [ "Rect" ]
|
||||
|
||||
[node name="BackButton" type="Button" parent="." index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 4.0
|
||||
margin_top = 453.0
|
||||
margin_right = 279.0
|
||||
margin_bottom = 659.0
|
||||
rect_scale = Vector2( 0.7, 0.7 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
icon = ExtResource( 2 )
|
||||
flat = true
|
||||
align = 1
|
||||
_sections_unfolded = [ "Rect" ]
|
||||
|
||||
[connection signal="pressed" from="BackButton" to="." method="_on_BackButton_pressed"]
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Menus/Menu.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Menus/patreon.png" type="Texture" id=2]
|
||||
[ext_resource path="res://Menus/libera.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Menus/opens_externally.png" type="Texture" id=4]
|
||||
|
||||
[node name="Menu" instance=ExtResource( 1 )]
|
||||
|
||||
[node name="PatreonLink" type="Button" parent="." index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 641.0
|
||||
margin_top = 446.0
|
||||
margin_right = 1403.0
|
||||
margin_bottom = 565.0
|
||||
rect_scale = Vector2( 0.5, 0.5 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
icon = ExtResource( 2 )
|
||||
flat = true
|
||||
align = 1
|
||||
_sections_unfolded = [ "Rect" ]
|
||||
|
||||
[node name="LiberaLink" type="Button" parent="." index="3"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 641.0
|
||||
margin_top = 509.0
|
||||
margin_right = 1403.0
|
||||
margin_bottom = 628.0
|
||||
rect_scale = Vector2( 0.5, 0.5 )
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
icon = ExtResource( 3 )
|
||||
flat = true
|
||||
align = 1
|
||||
_sections_unfolded = [ "Rect" ]
|
||||
|
||||
[node name="OpensExternally" type="Sprite" parent="." index="4"]
|
||||
|
||||
position = Vector2( 824.133, 418.745 )
|
||||
scale = Vector2( 0.3, 0.3 )
|
||||
texture = ExtResource( 4 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[connection signal="pressed" from="PatreonLink" to="." method="_on_PatreonLink_pressed"]
|
||||
|
||||
[connection signal="pressed" from="LiberaLink" to="." method="_on_LiberaLink_pressed"]
|
||||
|
||||
|
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 20 KiB |
|
@ -34,6 +34,7 @@ var double_laser = false
|
|||
var can_shoot = true
|
||||
var timer = null
|
||||
var bullet_delay = 0.1
|
||||
var damage = 0
|
||||
|
||||
func _ready():
|
||||
_update_health_bar()
|
||||
|
@ -43,17 +44,26 @@ func _process(delta):
|
|||
#health = slave_health
|
||||
pass
|
||||
|
||||
if $Line2D.default_color.r > 0:
|
||||
$Line2D.default_color.r -= delta
|
||||
if $Line2D.default_color.g < 180:
|
||||
$Line2D.default_color.g += delta
|
||||
if $Line2D.default_color.b > 0:
|
||||
$Line2D.default_color.b -= delta
|
||||
|
||||
if health <= 100 && $BlownOut/WhoopsGuy.unit_offset < 1:
|
||||
$BlownOut/WhoopsGuy.unit_offset += delta
|
||||
|
||||
func _on_Mothership_area_shape_entered(area_id, area, area_shape, self_shape):
|
||||
#if not get_tree().has_network_peer():
|
||||
if not get_tree().is_network_server():
|
||||
if get_tree().is_network_server() == false:
|
||||
health -= 50
|
||||
if get_tree().is_network_server():
|
||||
if get_tree().is_network_server() == true:
|
||||
health -= 50
|
||||
rset("slave_health", health)
|
||||
|
||||
$Line2D.default_color = Color("b70000")
|
||||
|
||||
if area.boss:
|
||||
emit_signal("flash")
|
||||
health = 0
|
||||
|
@ -78,4 +88,3 @@ func _on_Player_restart_game():
|
|||
func _update_health_bar():
|
||||
var health_bar = Vector2(((health * (.8)) + 100), 300)
|
||||
$Line2D.set_point_position( 1, health_bar )
|
||||
print(health)
|
|
@ -31,7 +31,7 @@ _data = {
|
|||
}
|
||||
_sections_unfolded = [ "Resource" ]
|
||||
|
||||
[node name="Mothership" type="Area2D"]
|
||||
[node name="Mothership" type="Area2D" index="0"]
|
||||
|
||||
position = Vector2( 42.1613, 302.944 )
|
||||
scale = Vector2( 0.263572, 0.240903 )
|
||||
|
@ -90,7 +90,7 @@ position = Vector2( 32.7402, 101.849 )
|
|||
scale = Vector2( 3.33333, 3.33333 )
|
||||
points = PoolVector2Array( 100, 300, 900, 300 )
|
||||
width = 15.0
|
||||
default_color = Color( 0.037384, 0.683594, 0, 1 )
|
||||
default_color = Color( 0.0352941, 0.717647, 0, 1 )
|
||||
texture_mode = 31
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
|
|
|
@ -419,6 +419,8 @@ animation = "default"
|
|||
|
||||
[node name="Lobby" type="Node" parent="." index="14"]
|
||||
|
||||
editor/display_folded = true
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="Lobby" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
|
|
8
Node.gd
|
@ -23,9 +23,9 @@ signal restart
|
|||
var rectangle_opacity = 0
|
||||
|
||||
func _ready():
|
||||
# Called every time the node is added to the scene.
|
||||
# Initialization here
|
||||
pass
|
||||
if get_tree().has_network_peer() && not get_tree().is_network_server():
|
||||
$Restart.visible = false
|
||||
$Button.disabled = true
|
||||
|
||||
func _process(delta):
|
||||
$ColorRect.color = Color(0, 0, 0, rectangle_opacity)
|
||||
|
@ -37,7 +37,7 @@ func _process(delta):
|
|||
|
||||
func _on_Button_pressed():
|
||||
emit_signal("restart")
|
||||
queue_free()
|
||||
#queue_free()
|
||||
|
||||
func _on_Button_button_down():
|
||||
$Restart.frame = 1
|
||||
|
|
|
@ -85,8 +85,10 @@ func _ready():
|
|||
|
||||
var timer = null
|
||||
|
||||
var damage = 0
|
||||
var can_shoot = false
|
||||
var shoot_down = false
|
||||
var is_shooting = false
|
||||
|
||||
func on_timeout_complete():
|
||||
can_shoot = true
|
||||
|
@ -120,11 +122,15 @@ var rainbow_is_on = false
|
|||
func _process(delta):
|
||||
$Username.text = username
|
||||
|
||||
if is_shooting:
|
||||
shoot()
|
||||
|
||||
if rainbow_is_on:
|
||||
rainbow(delta)
|
||||
|
||||
pass
|
||||
|
||||
var laser_damage = 10
|
||||
func shoot():
|
||||
if can_shoot:
|
||||
var laser = Laser.instance()
|
||||
|
@ -132,6 +138,7 @@ func shoot():
|
|||
laser.current_pen = laser_penetration
|
||||
laser.position.y = position.y - 27
|
||||
laser.position.x = position.x + 46
|
||||
laser.damage = laser_damage
|
||||
|
||||
#MAYBE THE LASERS SHOULD BE THEIR OWN NODES
|
||||
#Would allow for more simple additions in the future
|
||||
|
@ -141,6 +148,7 @@ func shoot():
|
|||
laser2.position.y = position.y + 28
|
||||
laser2.position.x = position.x + 46
|
||||
laser2.current_pen = laser_penetration
|
||||
laser2.damage = laser_damage
|
||||
|
||||
can_shoot = false
|
||||
timer.start()
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# Copyright (C) 2018 Sage Vaillancourt, sagev9000@gmail.com
|
||||
#
|
||||
# This file is part of Fronter.
|
||||
#
|
||||
# Fronter is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Fronter is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Fronter. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
extends Node
|
||||
|
||||
signal menu_closed
|
||||
signal change_color
|
||||
signal taste_the_rainbow
|
||||
|
||||
func _ready():
|
||||
$ColorRect.color = Color(0,0,0,1)
|
||||
|
||||
func _process(delta):
|
||||
if (Input.is_action_pressed("ui_quit")):
|
||||
get_tree().quit()
|
||||
#if Input.is_action_pressed("ui_accept"):
|
||||
# _on_Button_pressed())
|
||||
|
||||
func _on_Resume_pressed():
|
||||
get_tree().paused = false
|
||||
emit_signal("menu_closed")
|
||||
queue_free()
|
||||
|
||||
func _on_Goldenrod_pressed():
|
||||
emit_signal("change_color", "daa520")
|
||||
|
||||
func _on_Purple_pressed():
|
||||
emit_signal("change_color", "800080")
|
||||
|
||||
func _on_SlateBlue_pressed():
|
||||
emit_signal("change_color", "708090")
|
||||
|
||||
func _on_Salmon_pressed():
|
||||
emit_signal("change_color", "e9967a")
|
||||
|
||||
func _on_Crimson_pressed():
|
||||
emit_signal("change_color", "dc143c")
|
||||
|
||||
func _on_MediumSpringGreen_pressed():
|
||||
emit_signal("change_color", "3cb371")
|
||||
|
||||
func _on_Tomato_pressed():
|
||||
emit_signal("change_color", "ff3e2d")
|
||||
prints("put tomato in dere")
|
||||
|
||||
func _on_DarkenedLawnGreen_pressed():
|
||||
emit_signal("change_color", "7bd126")
|
||||
|
||||
func _on_DeepSkyBlue_pressed():
|
||||
emit_signal("change_color", "00bfff")
|
||||
|
||||
#### NOT PAUSING GAME? ####
|
||||
func _on_Rainbow_pressed():
|
||||
get_tree().paused = false
|
||||
emit_signal("taste_the_rainbow")
|
|
@ -0,0 +1,331 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://PauseMenu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/ColorSelect.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="Theme" id=1]
|
||||
|
||||
|
||||
[node name="PauseMenu" type="Node"]
|
||||
|
||||
pause_mode = 2
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Pause" ]
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1026.0
|
||||
margin_bottom = 605.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
|
||||
[node name="Resume" type="Button" parent="." index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 287.0
|
||||
margin_top = 481.0
|
||||
margin_right = 770.0
|
||||
margin_bottom = 523.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
theme = SubResource( 1 )
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Continue"
|
||||
flat = false
|
||||
align = 1
|
||||
|
||||
[node name="ColorSelect" type="Node2D" parent="." index="2"]
|
||||
|
||||
position = Vector2( 21, 0 )
|
||||
|
||||
[node name="ColorSelectBG" type="Sprite" parent="ColorSelect" index="0"]
|
||||
|
||||
editor/display_folded = true
|
||||
position = Vector2( 120, 210 )
|
||||
scale = Vector2( 0.179688, 0.179687 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="Goldenrod" type="Button" parent="ColorSelect/ColorSelectBG" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -501.0
|
||||
margin_top = -390.0
|
||||
margin_right = -167.0
|
||||
margin_bottom = -56.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Purple" type="Button" parent="ColorSelect/ColorSelectBG" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -167.0
|
||||
margin_top = -390.0
|
||||
margin_right = 167.0
|
||||
margin_bottom = -56.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="SlateBlue" type="Button" parent="ColorSelect/ColorSelectBG" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 167.0
|
||||
margin_top = -390.0
|
||||
margin_right = 501.0
|
||||
margin_bottom = -56.0001
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Salmon" type="Button" parent="ColorSelect/ColorSelectBG" index="3"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -501.0
|
||||
margin_top = -56.0
|
||||
margin_right = -167.0
|
||||
margin_bottom = 278.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Crimson" type="Button" parent="ColorSelect/ColorSelectBG" index="4"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -167.0
|
||||
margin_top = -56.0
|
||||
margin_right = 167.0
|
||||
margin_bottom = 278.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="MediumSpringGreen" type="Button" parent="ColorSelect/ColorSelectBG" index="5"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 167.0
|
||||
margin_top = -56.0
|
||||
margin_right = 501.0
|
||||
margin_bottom = 278.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Tomato" type="Button" parent="ColorSelect/ColorSelectBG" index="6"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 167.0
|
||||
margin_top = 278.0
|
||||
margin_right = 501.0
|
||||
margin_bottom = 668.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="DarkenedLawnGreen" type="Button" parent="ColorSelect/ColorSelectBG" index="7"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -167.0
|
||||
margin_top = 334.0
|
||||
margin_right = 167.0
|
||||
margin_bottom = 668.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="DeepSkyBlue" type="Button" parent="ColorSelect/ColorSelectBG" index="8"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -501.0
|
||||
margin_top = 334.0
|
||||
margin_right = -167.0
|
||||
margin_bottom = 668.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Rainbow" type="Button" parent="ColorSelect/ColorSelectBG" index="9"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -501.0
|
||||
margin_top = 668.0
|
||||
margin_right = 501.0
|
||||
margin_bottom = 1002.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[connection signal="pressed" from="Resume" to="." method="_on_Resume_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/Goldenrod" to="." method="_on_Goldenrod_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/Purple" to="." method="_on_Purple_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/SlateBlue" to="." method="_on_SlateBlue_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/Salmon" to="." method="_on_Salmon_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/Crimson" to="." method="_on_Crimson_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/MediumSpringGreen" to="." method="_on_MediumSpringGreen_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/Tomato" to="." method="_on_Tomato_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/DarkenedLawnGreen" to="." method="_on_DarkenedLawnGreen_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/DeepSkyBlue" to="." method="_on_DeepSkyBlue_pressed"]
|
||||
|
||||
[connection signal="pressed" from="ColorSelect/ColorSelectBG/Rainbow" to="." method="_on_Rainbow_pressed"]
|
||||
|
||||
|
348
Player.gd
|
@ -24,12 +24,17 @@ signal update_display # tells parent to update points display
|
|||
signal refund # will tell parent a refund is occuring, for display
|
||||
signal shooting_speed_upgrade # signals that a shooting speed upgrade has occured
|
||||
signal other_shooting_upgrade
|
||||
signal other_damage_upgrade
|
||||
signal double_laser_upgrade
|
||||
signal other_laser_penetration_upgrade
|
||||
signal other_ship_color_change
|
||||
signal other_ship_enable_rainbow
|
||||
signal shooting_speed_fully_upgraded
|
||||
signal restart_game
|
||||
signal multiplayer_movement
|
||||
signal start_next_round
|
||||
signal buy_turret
|
||||
signal upgrade_turret_range
|
||||
|
||||
export (PackedScene) var Laser
|
||||
|
||||
|
@ -40,12 +45,8 @@ export (PackedScene) var Laser
|
|||
var ship_speed = 500
|
||||
|
||||
# first 5 tiers of shooting speed
|
||||
const BULLET_DELAY_TIER1 = 0.8
|
||||
const BULLET_DELAY_TIER2 = 0.5
|
||||
const BULLET_DELAY_TIER3 = 0.2
|
||||
const BULLET_DELAY_TIER4 = 0.1
|
||||
const BULLET_DELAY_TIER5 = 0.05
|
||||
|
||||
#const BULLET_DELAY_DICT = {1:0.8, 2:0.5, 3:0.4, 4:0.2, 5:0.05} #original
|
||||
const BULLET_DELAY_DICT = {1:0.8, 2:0.6, 3:0.4, 4:0.2, 5:0.1}
|
||||
# starting cost of shooting speed upgrades after tier 5
|
||||
const SHOOTING_SPEED_UPGRADE_DEFAULT = 1500
|
||||
|
||||
|
@ -53,32 +54,30 @@ const SHOOTING_SPEED_UPGRADE_DEFAULT = 1500
|
|||
const BULLET_DELAY_MINIMUM = 0.01
|
||||
|
||||
# costs of shooting speed upgrades
|
||||
const BULLET_DELAY_TIER2_COST = 100
|
||||
const BULLET_DELAY_TIER3_COST = 200
|
||||
const BULLET_DELAY_TIER4_COST = 400
|
||||
const BULLET_DELAY_TIER5_COST = 1000
|
||||
const BULLET_DELAY_COST = {2:100, 3:400, 4:1000, 5:4000, 6:0}
|
||||
|
||||
# double laser cost
|
||||
const DOUBLE_LASER_COST = 2000
|
||||
const DOUBLE_LASER_COST = 6000
|
||||
|
||||
# 5 tiers of laser damage
|
||||
const LASER_DAMAGE_TIER1 = 10
|
||||
const LASER_DAMAGE_TIER2 = 12
|
||||
const LASER_DAMAGE_TIER3 = 15
|
||||
const LASER_DAMAGE_TIER4 = 20
|
||||
const LASER_DAMAGE_TIER5 = 50
|
||||
const LASER_DAMAGE_DICT = {1:10, 2:15, 3:20, 4:40, 5:50}
|
||||
|
||||
# costs of laser damage upgrades
|
||||
const LASER_DAMAGE_TIER2_COST = 200
|
||||
const LASER_DAMAGE_TIER3_COST = 500
|
||||
const LASER_DAMAGE_TIER4_COST = 1000
|
||||
const LASER_DAMAGE_TIER5_COST = 2000
|
||||
const LASER_DAMAGE_COST = {2:400, 3:1000, 4:2000, 5:6000, 6:0}
|
||||
|
||||
# costs of laser penetration upgrades
|
||||
const LASER_PENETRATION_COST = {2:400, 3:1000, 4:2000, 5:6000, 6:0}
|
||||
|
||||
# 5 tiers of laser penetration
|
||||
const LASER_PENETRATION_DICT = {1:0,2:1,3:2,4:3,5:5}
|
||||
# the ship's starting position
|
||||
const STARTING_POSITION = Vector2(130, 250)
|
||||
|
||||
# the amount of money the player starts with
|
||||
const STARTING_MONEY = 10000
|
||||
const STARTING_MONEY = 0#100000
|
||||
|
||||
# cost to unlock turrets
|
||||
const UNLOCK_TURRETS_COST = 1000
|
||||
|
||||
#################################
|
||||
|
||||
|
@ -95,13 +94,19 @@ var can_shoot = false
|
|||
var timer = null
|
||||
|
||||
# sets the delay between shots to the default
|
||||
var bullet_delay = BULLET_DELAY_TIER1
|
||||
var bullet_delay_tier = 0
|
||||
var bullet_delay = BULLET_DELAY_DICT[1]
|
||||
var bullet_delay_tier = 1
|
||||
|
||||
# sets other shooting settings to their defaults
|
||||
var laser_penetration = 0
|
||||
var laser_penetration = LASER_PENETRATION_DICT[1]
|
||||
var laser_penetration_tier = 1
|
||||
var double_laser = false
|
||||
var laser_damage = LASER_DAMAGE_TIER1
|
||||
var laser_damage = LASER_DAMAGE_DICT[1]
|
||||
var laser_damage_tier = 1
|
||||
|
||||
# turret settings
|
||||
var turrets_unlocked = false
|
||||
var has_turret = false
|
||||
|
||||
# gives the player their starting points
|
||||
var money = STARTING_MONEY
|
||||
|
@ -116,108 +121,209 @@ var refund_percentage = 1
|
|||
# only really relevant to touchscreens
|
||||
var menu_open = false
|
||||
|
||||
var boss = false
|
||||
var damage = 0
|
||||
|
||||
# opens the upgrade menu
|
||||
func upgradeMenu():
|
||||
menu_open = true
|
||||
var upgmenu = preload("res://UpgradeMenu.tscn").instance()
|
||||
menu_open = true
|
||||
add_child(upgmenu)
|
||||
upgmenu.connect("refund", self, "_refund_button")
|
||||
upgmenu.connect("bullet_delay_upgrade", self, "upgradeBulletDelay_button")
|
||||
upgmenu.connect("double_laser_upgrade", self, "doubleLaserUpgrade_button")
|
||||
upgmenu.connect("laser_penetration_upgrade", self, "laserPenetrationUpgrade_button")
|
||||
upgmenu.connect("menu_closed", self, "menuClosed")
|
||||
upgmenu.connect("bullet_delay_upgrade", self, "upgradeBulletDelay")
|
||||
upgmenu.connect("double_laser_upgrade", self, "doubleLaserUpgrade")
|
||||
upgmenu.connect("laser_penetration_upgrade", self, "laserPenetrationUpgrade")
|
||||
upgmenu.connect("change_color", self, "changeColor")
|
||||
upgmenu.connect("taste_the_rainbow", self, "enable_the_rainbow")
|
||||
upgmenu.connect("laser_damage_upgrade", self, "upgradeLaserDamage")
|
||||
upgmenu.connect("menu_closed", self, "upgradeMenuClosed")
|
||||
upgmenu.connect("unlock_turrets", self, "unlockTurrets")
|
||||
upgmenu.connect("buy_turret", self, "buyTurret")
|
||||
upgmenu.connect("turret_menu", self, "openTurretMenu")
|
||||
upgmenu.laser_damage_tier = laser_damage_tier
|
||||
upgmenu.bullet_delay_tier = bullet_delay_tier
|
||||
upgmenu.laser_penetration_tier = laser_penetration_tier
|
||||
upgmenu.turrets_unlocked = turrets_unlocked
|
||||
upgmenu.has_turret = has_turret
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
# signalled on close of UpgradeMenu
|
||||
func menuClosed():
|
||||
func upgradeMenuClosed():
|
||||
menu_open = false
|
||||
emit_signal("start_next_round")
|
||||
|
||||
func pauseMenu():
|
||||
menu_open = true
|
||||
var pausemenu = preload("res://PauseMenu.tscn").instance()
|
||||
add_child(pausemenu)
|
||||
pausemenu.connect("change_color", self, "changeColor")
|
||||
pausemenu.connect("menu_closed", self, "pauseMenuClosed")
|
||||
pausemenu.connect("taste_the_rainbow", self, "enable_the_rainbow")
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
func pauseMenuClosed():
|
||||
menu_open = false
|
||||
|
||||
func openTurretMenu():
|
||||
var turretmenu = preload("res://TurretMenu.tscn").instance()
|
||||
add_child(turretmenu)
|
||||
turretmenu.connect("buy_turret", self, "buyTurret")
|
||||
turretmenu.connect("turret_range_upgrade", self, "turretRangeUpgrade")
|
||||
turretmenu.screensize = screensize
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
func makePurchaseFor(cost):
|
||||
if money >= cost:
|
||||
money -= cost
|
||||
emit_signal("update_display")
|
||||
return true
|
||||
else:
|
||||
return false
|
||||
|
||||
#######################
|
||||
# REQUESTING UPGRADES #
|
||||
#######################
|
||||
# all will request their upgrade
|
||||
# all will pause the game if not in multiplayer
|
||||
|
||||
func doubleLaserUpgrade_button():
|
||||
doubleLaserUpgrade()
|
||||
emit_signal("update_display")
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
func laserPenetrationUpgrade_button():
|
||||
laserPenetrationUpgrade()
|
||||
emit_signal("update_display")
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
func upgradeShipSpeed_button():
|
||||
upgradeShipSpeed()
|
||||
emit_signal("update_display")
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
func upgradeBulletDelay_button():
|
||||
upgradeBulletDelay()
|
||||
emit_signal("update_display")
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
#######################
|
||||
|
||||
|
||||
######################
|
||||
# PROVIDING UPGRADES #
|
||||
######################
|
||||
# checks which tier the player is already on, and if they have enough points
|
||||
# upgrades and charges the player, if possible
|
||||
# increases the ship value by the amount spent, for refunds
|
||||
# sends an rpc message about current state for a given upgrade
|
||||
|
||||
# upgrades shooting speed
|
||||
func upgradeBulletDelay():
|
||||
if (bullet_delay == BULLET_DELAY_TIER1 && money >= BULLET_DELAY_TIER2_COST):
|
||||
bullet_delay = BULLET_DELAY_TIER2
|
||||
money -= BULLET_DELAY_TIER2_COST
|
||||
ship_value += BULLET_DELAY_TIER2_COST
|
||||
bullet_delay_tier = 1
|
||||
elif (bullet_delay == BULLET_DELAY_TIER2 && money >= BULLET_DELAY_TIER3_COST):
|
||||
bullet_delay = BULLET_DELAY_TIER3
|
||||
money -= BULLET_DELAY_TIER3_COST
|
||||
ship_value += BULLET_DELAY_TIER3_COST
|
||||
bullet_delay_tier = 2
|
||||
elif (bullet_delay == BULLET_DELAY_TIER3 && money >= BULLET_DELAY_TIER4_COST):
|
||||
bullet_delay = BULLET_DELAY_TIER4
|
||||
money -= BULLET_DELAY_TIER4_COST
|
||||
ship_value += BULLET_DELAY_TIER4_COST
|
||||
bullet_delay_tier = 3
|
||||
elif (bullet_delay == BULLET_DELAY_TIER4 && money >= BULLET_DELAY_TIER5_COST):
|
||||
bullet_delay = BULLET_DELAY_TIER5
|
||||
money -= BULLET_DELAY_TIER5_COST
|
||||
ship_value += BULLET_DELAY_TIER5_COST
|
||||
bullet_delay_tier = 4
|
||||
# elif (bullet_delay <= BULLET_DELAY_MINIMUM):
|
||||
# emit_signal("bullet_delay_fully_upgraded")
|
||||
# elif (bullet_delay <= BULLET_DELAY_TIER5 && money >= shooting_speed_upgrade):
|
||||
# bullet_delay = bullet_delay*0.95
|
||||
# money -= shooting_speed_upgrade
|
||||
# ship_value += shooting_speed_upgrade
|
||||
# shooting_speed_upgrade *= 1.1
|
||||
# bullet_delay_tier += 1
|
||||
func unlockTurrets():
|
||||
if money >= UNLOCK_TURRETS_COST:# && turrets_unlocked == false:
|
||||
money -= UNLOCK_TURRETS_COST
|
||||
turrets_unlocked = true
|
||||
emit_signal("update_display")
|
||||
openTurretMenu()
|
||||
# pause if not multiplayer
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
timer.set_wait_time(bullet_delay)
|
||||
rpc("other_shooting_speed_upgrade", get_tree().get_network_unique_id(), bullet_delay)
|
||||
func buyTurret(turret_position, cost):
|
||||
#money -= cost
|
||||
emit_signal("update_display")
|
||||
if !get_tree().has_network_peer():
|
||||
emit_signal("buy_turret", get_tree().get_network_unique_id(), turret_position)
|
||||
has_turret = true
|
||||
get_tree().paused = true
|
||||
else:
|
||||
rpc("net_buying_turret", get_tree().get_network_unique_id(), turret_position)
|
||||
|
||||
sync func net_buying_turret(id, turret_position):
|
||||
emit_signal("buy_turret", id, turret_position)
|
||||
|
||||
func turretRangeUpgrade(cost, new_scale):
|
||||
if makePurchaseFor(cost):
|
||||
emit_signal("upgrade_turret_range", get_tree().get_network_unique_id(), new_scale)
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
#################################################
|
||||
# ALLOWS THE PLAYER TO SHOOT TWO LASERS AT ONCE #
|
||||
func doubleLaserUpgrade():
|
||||
# if the user has enough money, take that money, and enable doubles
|
||||
if money >= DOUBLE_LASER_COST && double_laser == false:
|
||||
money -= DOUBLE_LASER_COST
|
||||
double_laser = true
|
||||
|
||||
# tell other players to enable doubles for you
|
||||
rpc("double_laser_upgrade", get_tree().get_network_unique_id())
|
||||
|
||||
######################
|
||||
# tell main to update the points display
|
||||
emit_signal("update_display")
|
||||
|
||||
# pause if not multiplayer
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
# tell main about other ship's double_laser
|
||||
remote func double_laser_upgrade(id):
|
||||
emit_signal("double_laser_upgrade", id)
|
||||
# ALLOWS THE PLAYER TO SHOOT TWO LASERS AT ONCE #
|
||||
#################################################
|
||||
|
||||
|
||||
######################################################
|
||||
# ALLOWS LASERS TO PENETRATE ENEMIES BEFORE EXPIRING #
|
||||
var next_penetration_upgrade_cost = LASER_PENETRATION_COST[laser_penetration_tier + 1]
|
||||
func laserPenetrationUpgrade():
|
||||
if laser_penetration_tier < 5:
|
||||
if money >= LASER_PENETRATION_COST[laser_penetration_tier + 1]:
|
||||
laser_penetration_tier += 1
|
||||
laser_penetration = LASER_PENETRATION_DICT[laser_penetration_tier]
|
||||
money -= LASER_PENETRATION_COST[laser_penetration_tier]
|
||||
ship_value += LASER_PENETRATION_COST[laser_penetration_tier]
|
||||
next_penetration_upgrade_cost = LASER_PENETRATION_COST[laser_penetration_tier + 1]
|
||||
print(laser_penetration)
|
||||
emit_signal("update_display")
|
||||
|
||||
rpc("other_laser_penetration_upgrade", get_tree().get_network_unique_id(), laser_penetration)
|
||||
# pause if not multiplayer
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
|
||||
remote func other_laser_penetration_upgrade(id):
|
||||
emit_signal("other_laser_penetration_upgrade", id)
|
||||
|
||||
# tell main about other ship's
|
||||
# ALLOWS LASERS TO PENETRATE ENEMIES BEFORE EXPIRING #
|
||||
######################################################
|
||||
|
||||
|
||||
###############################################
|
||||
# INCREASES THE FIRE RATE FOR PLAYERS' LASERS #
|
||||
var next_bullet_delay_upgrade_cost = BULLET_DELAY_COST[bullet_delay_tier + 1]
|
||||
func upgradeBulletDelay():
|
||||
if bullet_delay_tier < 5:
|
||||
if money >= BULLET_DELAY_COST[bullet_delay_tier + 1]:
|
||||
bullet_delay_tier += 1
|
||||
bullet_delay = BULLET_DELAY_DICT[bullet_delay_tier]
|
||||
money -= BULLET_DELAY_COST[bullet_delay_tier]
|
||||
ship_value += BULLET_DELAY_COST[bullet_delay_tier]
|
||||
next_bullet_delay_upgrade_cost = BULLET_DELAY_COST[bullet_delay_tier + 1]
|
||||
print(bullet_delay)
|
||||
|
||||
timer.set_wait_time(bullet_delay)
|
||||
rpc("other_shooting_speed_upgrade", get_tree().get_network_unique_id(), bullet_delay)
|
||||
emit_signal("update_display")
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
# tell main about other ship's bullet_delay upgrade
|
||||
remote func other_shooting_speed_upgrade(id, bullet_delay):
|
||||
emit_signal("other_shooting_upgrade", id, bullet_delay)
|
||||
# INCREASES THE FIRE RATE FOR PLAYERS' LASERS #
|
||||
###############################################
|
||||
|
||||
|
||||
############################################
|
||||
# INCREASES DAMAGE DONE BY EACH LASER SHOT #
|
||||
var next_laser_damage_upgrade_cost = LASER_DAMAGE_COST[laser_damage_tier + 1]
|
||||
func upgradeLaserDamage():
|
||||
if laser_damage_tier < 5:
|
||||
if money >= LASER_DAMAGE_COST[laser_damage_tier + 1]:
|
||||
laser_damage_tier += 1
|
||||
laser_damage = LASER_DAMAGE_DICT[laser_damage_tier]
|
||||
money -= LASER_DAMAGE_COST[laser_damage_tier]
|
||||
ship_value += LASER_DAMAGE_COST[laser_damage_tier]
|
||||
next_laser_damage_upgrade_cost = LASER_DAMAGE_COST[laser_damage_tier + 1]
|
||||
print(laser_damage)
|
||||
|
||||
rpc("other_laser_damage_upgrade", get_tree().get_network_unique_id(), laser_damage)
|
||||
emit_signal("update_display")
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
# tell main about other ship's laser_damage upgrade
|
||||
remote func other_laser_damage_upgrade(id, laser_damage):
|
||||
emit_signal("other_damage_upgrade", id, laser_damage)
|
||||
# INCREASES DAMAGE DONE BY EACH LASER SHOT #
|
||||
############################################
|
||||
|
||||
func _ready():
|
||||
# for measuring time between lasers
|
||||
|
@ -239,25 +345,36 @@ func _ready():
|
|||
|
||||
# resets all upgrades to the default
|
||||
# refunds them with adjustable percentage returned
|
||||
# not currently 100%, so disabled
|
||||
func _refund_button():
|
||||
bullet_delay = BULLET_DELAY_TIER1
|
||||
bullet_delay_tier = 0
|
||||
bullet_delay = BULLET_DELAY_DICT[1]
|
||||
bullet_delay_tier = 1
|
||||
timer.set_wait_time(bullet_delay)
|
||||
laser_penetration = 0
|
||||
double_laser = false
|
||||
rainbow_is_on = false
|
||||
changeColor(Color(1,1,1,1))
|
||||
shooting_speed_upgrade = SHOOTING_SPEED_UPGRADE_DEFAULT
|
||||
money += ship_value*refund_percentage
|
||||
prints("Refunded ", ship_value*refund_percentage)
|
||||
ship_value = 0
|
||||
emit_signal("update_display")
|
||||
get_tree().paused = true
|
||||
#get_tree().paused = true
|
||||
|
||||
#Changes the ships color
|
||||
############################
|
||||
# Changes the ship's color #
|
||||
func changeColor(color):
|
||||
$AnimatedSprite.modulate = color
|
||||
if get_tree().has_network_peer():
|
||||
rpc("_change_color", get_tree().get_network_unique_id(), color)
|
||||
|
||||
# tell main about other ship's color change
|
||||
remote func _change_color(id, color):
|
||||
emit_signal("other_ship_color_change", id, color)
|
||||
|
||||
# Changes the ship's color #
|
||||
############################
|
||||
|
||||
func on_timeout_complete():
|
||||
can_shoot = true
|
||||
|
||||
|
@ -274,22 +391,9 @@ func moveto(finger_position):
|
|||
if (position.y > finger_position.y - 100 && finger_position.x < 800):
|
||||
velocity.y -= 1
|
||||
|
||||
|
||||
remote func move_player(id, position, is_shooting):
|
||||
emit_signal("multiplayer_movement", id, position, is_shooting)
|
||||
|
||||
remote func other_shooting_speed_upgrade(id, bullet_delay):
|
||||
emit_signal("other_shooting_upgrade", id, bullet_delay)
|
||||
|
||||
remote func _change_color(id, color):
|
||||
emit_signal("other_ship_color_change", id, color)
|
||||
|
||||
remote func _enable_rainbow(id):
|
||||
emit_signal("other_ship_enable_rainbow", id)
|
||||
|
||||
remote func double_laser_upgrade(id):
|
||||
emit_signal("double_laser_upgrade", id)
|
||||
|
||||
# the player's movement vector
|
||||
var velocity = Vector2()
|
||||
|
||||
|
@ -329,8 +433,8 @@ func _process(delta):
|
|||
is_shooting = true
|
||||
|
||||
# if in multiplayer mode, push position and shooting status as often as possible
|
||||
if get_tree().has_network_peer():
|
||||
rpc("move_player", get_tree().get_network_unique_id(), position, is_shooting)
|
||||
#if get_tree().has_network_peer():
|
||||
# rpc_unreliable("move_player", get_tree().get_network_unique_id(), position, is_shooting)
|
||||
|
||||
# if shoot button is pressed, try shooting
|
||||
if Input.is_action_pressed("ui_accept"):
|
||||
|
@ -360,6 +464,7 @@ func shoot():
|
|||
laser2.position.y = position.y + 28
|
||||
laser2.position.x = position.x + 46
|
||||
laser2.current_pen = laser_penetration
|
||||
laser2.damage = laser_damage
|
||||
|
||||
# don't shoot again until the timer resets
|
||||
can_shoot = false
|
||||
|
@ -370,9 +475,16 @@ func shoot():
|
|||
func enable_the_rainbow():
|
||||
if money >= 2000 && not rainbow_is_on:
|
||||
money -= 2000
|
||||
emit_signal("update_display")
|
||||
rainbow_is_on = true
|
||||
rpc("_enable_rainbow", get_tree().get_network_unique_id())
|
||||
|
||||
if !get_tree().has_network_peer():
|
||||
get_tree().paused = true
|
||||
|
||||
remote func _enable_rainbow(id):
|
||||
emit_signal("other_ship_enable_rainbow", id)
|
||||
|
||||
func rainbow(delta):
|
||||
if rainbow.r < 1 && r_up:
|
||||
rainbow.r += rainbow_speed*delta/10
|
||||
|
@ -397,9 +509,10 @@ func rainbow(delta):
|
|||
|
||||
$AnimatedSprite.modulate = rainbow
|
||||
|
||||
var gameover
|
||||
# displays endgame screen and pauses
|
||||
func gameOver():
|
||||
var gameover = preload("res://GameOver.tscn").instance()
|
||||
gameover = preload("res://GameOver.tscn").instance()
|
||||
add_child(gameover)
|
||||
gameover.connect("restart", self, "restart_game")
|
||||
# gameover.connect("bullet_delay_upgrade", self, "upgradeBulletDelay_button")
|
||||
|
@ -412,3 +525,8 @@ func restart_game():
|
|||
get_tree().paused = false
|
||||
money = STARTING_MONEY
|
||||
emit_signal("restart_game")
|
||||
gameover.queue_free()
|
||||
|
||||
func _on_Timer_timeout():
|
||||
if get_tree().has_network_peer():
|
||||
rpc_unreliable("move_player", get_tree().get_network_unique_id(), position, is_shooting)
|
||||
|
|
14
Player.tscn
|
@ -17,7 +17,7 @@ animations = [ {
|
|||
[sub_resource type="CapsuleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 12.8998
|
||||
radius = 25.7545
|
||||
height = 40.4125
|
||||
|
||||
[node name="Player" type="Area2D"]
|
||||
|
@ -46,8 +46,18 @@ _sections_unfolded = [ "Transform" ]
|
|||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="1"]
|
||||
|
||||
position = Vector2( 45.5518, -3.09424 )
|
||||
position = Vector2( 5.85673, 1.31631 )
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 2 )
|
||||
_sections_unfolded = [ "Material", "Transform", "Visibility", "Z Index" ]
|
||||
|
||||
[node name="Timer" type="Timer" parent="." index="2"]
|
||||
|
||||
process_mode = 1
|
||||
wait_time = 0.02
|
||||
one_shot = false
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
|
||||
|
||||
|
||||
|
|
14
Prison.gd
|
@ -1,7 +1,7 @@
|
|||
extends "res://Bad.gd"
|
||||
|
||||
func _ready():
|
||||
health = 500
|
||||
health = 500 #500
|
||||
speed = 50
|
||||
pass
|
||||
|
||||
|
@ -20,20 +20,20 @@ func _process(delta):
|
|||
if centered_x && centered_y:
|
||||
$StarSprite.rotation += delta*10
|
||||
position.x -= delta*500
|
||||
if position.x < 0:
|
||||
if position.x < -50:
|
||||
emit_signal("health_up", 200)
|
||||
queue_free()
|
||||
|
||||
else:
|
||||
if position.x < 500:
|
||||
position.x += delta*100
|
||||
position.x += delta*(544-position.x)+1
|
||||
elif position.x > 524:
|
||||
position.x -= delta*100
|
||||
position.x -= delta*(position.x-480)+1
|
||||
else:
|
||||
centered_x = true
|
||||
|
||||
if position.y < 280:
|
||||
position.y += delta*100
|
||||
position.y += delta*(320-position.y)+1
|
||||
elif position.y > 320:
|
||||
position.y -= delta*100
|
||||
position.y -= delta*(position.y-280)+1
|
||||
else:
|
||||
centered_y = true
|
|
@ -30,9 +30,12 @@ animations = [ {
|
|||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="Prison" instance=ExtResource( 1 )]
|
||||
[node name="Prison" groups=[
|
||||
"enemies",
|
||||
] instance=ExtResource( 1 )]
|
||||
|
||||
scale = Vector2( 0.2, 0.2 )
|
||||
collision_layer = 4
|
||||
script = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Collision", "Transform" ]
|
||||
|
||||
|
|
4
Range.gd
|
@ -1,8 +1,6 @@
|
|||
extends Area2D
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = "textvar"
|
||||
var damage = 20
|
||||
|
||||
func _ready():
|
||||
# Called every time the node is added to the scene.
|
||||
|
|
|
@ -28,7 +28,7 @@ export (PackedScene) var Laser
|
|||
#### MAYBE ADD A HEALTH BAR TO MAIN ITSELF ####
|
||||
#var health = 3000
|
||||
# DEFAULT:
|
||||
var starting_health = 20000
|
||||
var starting_health = 3000
|
||||
var health = starting_health
|
||||
|
||||
var timer = null
|
||||
|
@ -88,7 +88,7 @@ func _process(delta):
|
|||
if health > 1000:
|
||||
position.y -= delta*speed_multiplier
|
||||
|
||||
if health < -3000 && $Inside/InsideBadSprite.rotation_degrees < 180:
|
||||
if health < -1*(starting_health/10) && $Inside/InsideBadSprite.rotation_degrees < 180:
|
||||
$Inside/InsideBadSprite.rotation_degrees += delta*20
|
||||
|
||||
if $Inside/InsideBadSprite.rotation_degrees > 179 && $Inside/InsideBadSprite.rotation_degrees < 190:
|
||||
|
@ -150,33 +150,33 @@ func _on_Inside_area_entered(area):
|
|||
emit_signal("boss_health", health, starting_health)
|
||||
|
||||
func updateOutsideSprite():
|
||||
if health > 18000:
|
||||
if health > starting_health*.9:
|
||||
$BigBadSprite.frame = 0
|
||||
elif health > 16000:
|
||||
elif health > starting_health*.8:
|
||||
$BigBadSprite.frame = 1
|
||||
elif health > 14000:
|
||||
elif health > starting_health*.7:
|
||||
$BigBadSprite.frame = 2
|
||||
elif health > 12000:
|
||||
elif health > starting_health*.6:
|
||||
$BigBadSprite.frame = 3
|
||||
elif health > 10000:
|
||||
elif health > starting_health*.5:
|
||||
$BigBadSprite.frame = 4
|
||||
elif health > 9000:
|
||||
elif health > starting_health*.45:
|
||||
$BigBadSprite.frame = 5
|
||||
elif health > 8000:
|
||||
elif health > starting_health*.4:
|
||||
$BigBadSprite.frame = 6
|
||||
elif health > 7000:
|
||||
elif health > starting_health*.35:
|
||||
$BigBadSprite.frame = 7
|
||||
elif health > 6000:
|
||||
elif health > starting_health*.3:
|
||||
$BigBadSprite.frame = 8
|
||||
elif health > 5000:
|
||||
elif health > starting_health*.25:
|
||||
$BigBadSprite.frame = 9
|
||||
elif health > 4000:
|
||||
elif health > starting_health*.2:
|
||||
$BigBadSprite.frame = 10
|
||||
elif health > 3000:
|
||||
elif health > starting_health*.15:
|
||||
$BigBadSprite.frame = 11
|
||||
elif health > 2000:
|
||||
elif health > starting_health*.1:
|
||||
$BigBadSprite.frame = 12
|
||||
elif health > 1500:
|
||||
elif health > starting_health*.075:
|
||||
timer.stop()
|
||||
$BigBadSprite.frame = 13
|
||||
$Inside/InsideBadSprite.frame = 2
|
||||
|
|
|
@ -51,7 +51,9 @@ animations = [ {
|
|||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 404.313, 217.774 )
|
||||
|
||||
[node name="RectangleBoss" type="Area2D"]
|
||||
[node name="RectangleBoss" type="Area2D" index="0" groups=[
|
||||
"enemies",
|
||||
]]
|
||||
|
||||
position = Vector2( 336.401, -1.22772 )
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
extends "res://Bad.gd"
|
||||
|
||||
func _ready():
|
||||
speed = 0
|
||||
#$RightArm/BadLaser.independent = false
|
||||
#$RightArm/BadLaser.health_multi = 3
|
||||
#$LeftArm/BadLaser.independent = false
|
||||
#$LeftArm/BadLaser.health_multi = 3
|
||||
pass
|
||||
|
||||
func _process(delta):
|
||||
$RightArm/UpperArm.rotate(delta)
|
||||
pass
|
|
@ -0,0 +1,107 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://Bad.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://RectangleReturn.gd" type="Script" id=2]
|
||||
[ext_resource path="res://art/bad/rectangle/return_arm.png" type="Texture" id=3]
|
||||
[ext_resource path="res://BadLaser.tscn" type="PackedScene" id=4]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 43.4086, 153.113 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 42.0251, 121.071 )
|
||||
|
||||
[node name="RectangleReturn" index="0" instance=ExtResource( 1 )]
|
||||
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="RightArm" type="Area2D" parent="." index="3"]
|
||||
|
||||
input_pickable = true
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
audio_bus_override = false
|
||||
audio_bus_name = "Master"
|
||||
|
||||
[node name="Forearm" type="RigidBody2D" parent="RightArm" index="0"]
|
||||
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
mode = 0
|
||||
mass = 1.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
gravity_scale = 0.0
|
||||
custom_integrator = false
|
||||
continuous_cd = 0
|
||||
contacts_reported = 0
|
||||
contact_monitor = false
|
||||
sleeping = false
|
||||
can_sleep = true
|
||||
linear_velocity = Vector2( 0, 0 )
|
||||
linear_damp = -1.0
|
||||
angular_velocity = 0.0
|
||||
angular_damp = -1.0
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="RightArm/Forearm" index="0"]
|
||||
|
||||
position = Vector2( 2.44351, 136.022 )
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
texture = ExtResource( 3 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="BadLaser" parent="RightArm/Forearm" index="1" instance=ExtResource( 4 )]
|
||||
|
||||
position = Vector2( 0.575623, 2.26275 )
|
||||
SPEED = 0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RightArm/Forearm" index="2"]
|
||||
|
||||
position = Vector2( 4, 95 )
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="UpperArm" type="RigidBody2D" parent="RightArm" index="1"]
|
||||
|
||||
editor/display_folded = true
|
||||
position = Vector2( 6.58612, 372.305 )
|
||||
input_pickable = false
|
||||
collision_layer = 1
|
||||
collision_mask = 1
|
||||
mode = 0
|
||||
mass = 1.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
gravity_scale = 0.0
|
||||
custom_integrator = false
|
||||
continuous_cd = 0
|
||||
contacts_reported = 0
|
||||
contact_monitor = false
|
||||
sleeping = false
|
||||
can_sleep = true
|
||||
linear_velocity = Vector2( 0, 0 )
|
||||
linear_damp = -1.0
|
||||
angular_velocity = 0.0
|
||||
angular_damp = -1.0
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="RightArm/UpperArm" index="0"]
|
||||
|
||||
scale = Vector2( 0.26, 0.26 )
|
||||
texture = ExtResource( 3 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RightArm/UpperArm" index="1"]
|
||||
|
||||
position = Vector2( 0, -1 )
|
||||
shape = SubResource( 3 )
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
[gd_scene format=2]
|
||||
|
||||
[node name="Node" type="Node" index="0"]
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1022.0
|
||||
margin_bottom = 600.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
|
||||
|
2
TODO
|
@ -1,4 +1,6 @@
|
|||
* Get the game on F-Droid
|
||||
* A more explicit "wave" system
|
||||
* Different types of fire. Slow enemies down? Area of effect?
|
||||
* More enemy variety
|
||||
* A way of increasing difficulty without it suddenly becoming impossible
|
||||
* Mothership art
|
||||
|
|
84
Turret.gd
|
@ -1,33 +1,66 @@
|
|||
extends Node2D
|
||||
|
||||
var current_target
|
||||
signal upgrade_turret
|
||||
|
||||
var can_shoot = true
|
||||
var damage = 15
|
||||
var reload_time = 1.5
|
||||
|
||||
var current_bad_id
|
||||
var current_bad = null
|
||||
var current_bad_shape
|
||||
|
||||
var tier = 1
|
||||
|
||||
const RANGE_TIER = {1:Vector2(30,30), 2:Vector2(40,40), 3:Vector2(50,50), 4:Vector2(60,60)}
|
||||
const DAMAGE_TIER = {1:15, 2:25, 3:50, 4:100}
|
||||
const RELOAD_TIER = {1:1.5, 2:1, 3:0.75, 4:0.5}
|
||||
const ANIMATION_TIER = {1:"plain", 2:"spike", 3:"spike", 4:"spike"}
|
||||
const ANIMATION_SCALE_TIER = {1:Vector2(.12,.12), 2:Vector2(.2,.2), 3:Vector2(.2,.2), 4:Vector2(.2,.2)}
|
||||
|
||||
var enemy_count = 0
|
||||
|
||||
func _ready():
|
||||
$ReloadTimer.wait_time = RELOAD_TIER[tier]
|
||||
damage = DAMAGE_TIER[tier]
|
||||
$Range.scale = RANGE_TIER[tier]
|
||||
$TurretSprite.animation = ANIMATION_TIER[tier]
|
||||
$TurretSprite.scale = ANIMATION_SCALE_TIER[tier]
|
||||
$Damage.text = str(damage)
|
||||
pass
|
||||
|
||||
var zeroPoint = Vector2(-60, -1015)
|
||||
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func entityEnteredRange(bad_id, bad, bad_shape, self_shape):
|
||||
print(bad.get_name())
|
||||
if ("Bad" in bad.get_name()) && can_shoot:
|
||||
current_target = bad_id
|
||||
#var local_pos = zeroPoint + area.position
|
||||
if current_bad:
|
||||
var wr = weakref(current_bad)
|
||||
if wr.get_ref():
|
||||
if current_bad != null:
|
||||
var local_pos = Vector2()
|
||||
local_pos = to_local(bad.position)
|
||||
local_pos = to_local(current_bad.position)
|
||||
$Beam.set_point_position(1, local_pos)
|
||||
$TurretSprite.rotation = ($Beam.get_point_position(0).angle_to($Beam.get_point_position(1))) + PI/5.3
|
||||
print($Beam.get_point_position(0).angle_to($Beam.get_point_position(1)))
|
||||
|
||||
if ("Bad" in current_bad.get_name()) && can_shoot:
|
||||
$Beam.default_color.a = 200
|
||||
$TurretSprite.frame = 1
|
||||
bad.hit("turret")
|
||||
if current_bad.health > damage:
|
||||
current_bad.hit(self)
|
||||
else:
|
||||
current_bad.hit(self)
|
||||
current_bad = null
|
||||
$FlashTimer.start()
|
||||
can_shoot = false
|
||||
|
||||
func entityEnteredRange(bad_id, bad, bad_shape, self_shape):
|
||||
#print(bad.get_name())
|
||||
if ("Bad" in bad.get_name() || "Black" in bad.get_name() || "Boss" in bad.get_name()):# && current_bad == null:
|
||||
current_bad = bad
|
||||
current_bad_id = bad_id
|
||||
current_bad_shape = bad_shape
|
||||
enemy_count += 1
|
||||
print(enemy_count)
|
||||
|
||||
func _on_FlashTimer_timeout():
|
||||
$Beam.default_color.a = 0
|
||||
$TurretSprite.frame = 0
|
||||
|
@ -36,3 +69,30 @@ func _on_FlashTimer_timeout():
|
|||
func _on_ReloadTimer_timeout():
|
||||
can_shoot = true
|
||||
pass # replace with function body
|
||||
|
||||
func entityExitedRange(bad_id, bad, bad_shape, self_shape):
|
||||
if weakref(bad):
|
||||
if ("Bad" in bad.get_name()):
|
||||
enemy_count -= 1
|
||||
|
||||
if bad_id == current_bad_id:
|
||||
current_bad = null
|
||||
current_bad_id = null
|
||||
current_bad_shape = null
|
||||
|
||||
func _on_OpenMenuButton_pressed():
|
||||
var menu = preload("res://TurretMenu.tscn").instance()
|
||||
add_child(menu)
|
||||
menu.connect("turret_upgrade", self, "upgradeTurret")
|
||||
|
||||
func upgradeTurret():
|
||||
tier += 1
|
||||
$ReloadTimer.wait_time = RELOAD_TIER[tier]
|
||||
damage = DAMAGE_TIER[tier]
|
||||
$Range.scale = RANGE_TIER[tier]
|
||||
$TurretSprite.animation = ANIMATION_TIER[tier]
|
||||
$TurretSprite.scale = ANIMATION_SCALE_TIER[tier]
|
||||
|
||||
func relayUpgrade():
|
||||
print("relayUpgrade()")
|
||||
emit_signal("upgrade_turret", position)
|
87
Turret.tscn
|
@ -1,8 +1,11 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://Turret.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/turret/turret.png" type="Texture" id=2]
|
||||
[ext_resource path="res://art/turret/shootin.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/turret/turret2.png" type="Texture" id=2]
|
||||
[ext_resource path="res://art/turret/shootin2.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/turret/turret.png" type="Texture" id=4]
|
||||
[ext_resource path="res://art/turret/shootin.png" type="Texture" id=5]
|
||||
[ext_resource path="res://art/hand-numbs.ttf" type="DynamicFontData" id=6]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
|
@ -14,10 +17,23 @@ radius = 32.0821
|
|||
animations = [ {
|
||||
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"name": "spike",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
|
||||
"loop": true,
|
||||
"name": "plain",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="DynamicFont" id=3]
|
||||
|
||||
size = 50
|
||||
use_mipmaps = false
|
||||
use_filter = false
|
||||
font_data = ExtResource( 6 )
|
||||
_sections_unfolded = [ "Font", "Settings" ]
|
||||
|
||||
[node name="Turret" type="Node2D"]
|
||||
|
||||
script = ExtResource( 1 )
|
||||
|
@ -30,13 +46,16 @@ points = PoolVector2Array( 26.4234, -6.61987, 2000, 0 )
|
|||
width = 10.0
|
||||
default_color = Color( 1, 0, 0, 0 )
|
||||
texture_mode = 31
|
||||
begin_cap_mode = 2
|
||||
end_cap_mode = 2
|
||||
sharp_limit = 2.0
|
||||
round_precision = 8
|
||||
_sections_unfolded = [ "Border", "Capping" ]
|
||||
|
||||
[node name="Range" type="Area2D" parent="." index="1"]
|
||||
|
||||
position = Vector2( -51.824, -18.5961 )
|
||||
scale = Vector2( 30.8534, 30.8534 )
|
||||
scale = Vector2( 30, 30 )
|
||||
input_pickable = true
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
|
@ -47,14 +66,16 @@ collision_layer = 31
|
|||
collision_mask = 31
|
||||
audio_bus_override = false
|
||||
audio_bus_name = "Master"
|
||||
_sections_unfolded = [ "Collision" ]
|
||||
_sections_unfolded = [ "Collision", "Transform" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="RangeCircle" type="CollisionShape2D" parent="Range" index="0"]
|
||||
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
shape = SubResource( 1 )
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
|
||||
[node name="FlashTimer" type="Timer" parent="." index="2"]
|
||||
|
||||
|
@ -75,13 +96,65 @@ autostart = true
|
|||
rotation = 0.785398
|
||||
scale = Vector2( 0.12, 0.12 )
|
||||
frames = SubResource( 2 )
|
||||
animation = "default"
|
||||
animation = "plain"
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
|
||||
[node name="OpenMenuButton" type="Button" parent="." index="5"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -81.0
|
||||
margin_top = -76.0
|
||||
margin_right = 82.0
|
||||
margin_bottom = 77.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Damage" type="Label" parent="." index="6"]
|
||||
|
||||
visible = false
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -32.0
|
||||
margin_top = -20.0
|
||||
margin_right = 13.0
|
||||
margin_bottom = 20.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
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
text = "15"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "custom_fonts" ]
|
||||
|
||||
[connection signal="area_shape_entered" from="Range" to="." method="entityEnteredRange"]
|
||||
|
||||
[connection signal="area_shape_exited" from="Range" to="." method="entityExitedRange"]
|
||||
|
||||
[connection signal="timeout" from="FlashTimer" to="." method="_on_FlashTimer_timeout"]
|
||||
|
||||
[connection signal="timeout" from="ReloadTimer" to="." method="_on_ReloadTimer_timeout"]
|
||||
|
||||
[connection signal="pressed" from="OpenMenuButton" to="." method="_on_OpenMenuButton_pressed"]
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
#
|
||||
# Copyright (C) 2018 Sage Vaillancourt, sagev9000@gmail.com
|
||||
#
|
||||
# This file is part of Fronter.
|
||||
#
|
||||
# Fronter is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Fronter is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Fronter. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
extends Node
|
||||
|
||||
signal menu_closed
|
||||
signal change_color
|
||||
signal buy_turret
|
||||
signal turret_range_upgrade
|
||||
signal turret_damage_upgrade
|
||||
signal turret_speed_upgrade
|
||||
|
||||
var screensize
|
||||
|
||||
const DEFAULT_TURRET_COST = 0#1000
|
||||
|
||||
const TIER_COST = {2:1000, 3:4000, 4:10000, 5:0}
|
||||
|
||||
func _ready():
|
||||
$ColorRect.color = Color(0,0,0,.8)
|
||||
|
||||
if get_parent().has_method("upgradeTurret"):
|
||||
$BuyTurret.visible = false
|
||||
|
||||
$Back.visible = false
|
||||
$BuyTurret.visible = false
|
||||
$Accept.visible = true
|
||||
if get_parent().has_method("upgradeTurret") != true:
|
||||
$Turret.visible = true
|
||||
else:
|
||||
$Upgrade/Button.text = str("Upgrade: $", TIER_COST[get_parent().tier+1])
|
||||
if get_parent().tier >= 4:
|
||||
$Upgrade/Button.visible = false
|
||||
|
||||
func _input(event):
|
||||
if $Turret.visible == true:
|
||||
if (event is InputEventScreenTouch || event is InputEventScreenDrag):
|
||||
if event.position.x < 800:
|
||||
$Turret.position.x = event.position.x + 100*(event.position.x/800)
|
||||
$Turret.position.y = event.position.y - 100
|
||||
|
||||
var velocity = Vector2()
|
||||
func _process(delta):
|
||||
if (Input.is_action_pressed("ui_quit")):
|
||||
get_tree().quit()
|
||||
#if Input.is_action_pressed("ui_accept"):
|
||||
# _on_Button_pressed()
|
||||
if $Turret.visible == true:
|
||||
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
|
||||
if (velocity.length() > 0):
|
||||
velocity = velocity.normalized() * 500
|
||||
$Turret.position += velocity * delta
|
||||
|
||||
if get_parent().has_method("upgradeTurret") == true:
|
||||
$Upgrade.visible = true
|
||||
$Turret.visible = false
|
||||
|
||||
func _on_Button_pressed():
|
||||
queue_free()
|
||||
|
||||
func backButton():
|
||||
queue_free()
|
||||
|
||||
var newTurret
|
||||
func buyTurret():
|
||||
if get_parent().money >= DEFAULT_TURRET_COST:
|
||||
var turret = preload("res://Turret.tscn").instance()
|
||||
turret.set_name(turret.get_name())
|
||||
newTurret = turret.get_name()
|
||||
|
||||
func acceptTurret():
|
||||
if get_parent().has_method("upgradeTurret") == true:
|
||||
queue_free()
|
||||
else:
|
||||
get_tree().paused = false
|
||||
emit_signal("buy_turret", $Turret.position, DEFAULT_TURRET_COST)
|
||||
#get_parent().has_turret = true
|
||||
$Accept.visible = false
|
||||
$Back.visible = true
|
||||
$Turret.visible = false
|
||||
queue_free()
|
||||
|
||||
func upgradeTurret():
|
||||
get_tree().paused = false
|
||||
if get_parent().get_parent().get_node("Player").makePurchaseFor(TIER_COST[get_parent().tier+1]):
|
||||
get_parent().upgradeTurret()
|
||||
get_parent().relayUpgrade()
|
||||
if get_parent().tier >= 4:
|
||||
$Upgrade/Button.visible = false
|
||||
else:
|
||||
$Upgrade/Button.text = str("Upgrade: $", TIER_COST[get_parent().tier+1])
|
|
@ -0,0 +1,231 @@
|
|||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://TurretMenu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/multiplayer_menu/back.png" type="Texture" id=2]
|
||||
[ext_resource path="res://art/upgrade_menu/buyturrets.png" type="Texture" id=3]
|
||||
[ext_resource path="res://art/multiplayer_menu/checkmark.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Turret.tscn" type="PackedScene" id=5]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=2]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="TurretMenu" type="Node"]
|
||||
|
||||
pause_mode = 2
|
||||
script = ExtResource( 1 )
|
||||
_sections_unfolded = [ "Pause" ]
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="." index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_right = 1026.0
|
||||
margin_bottom = 605.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
color = Color( 0, 0, 0, 1 )
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
|
||||
[node name="Back" type="Node2D" parent="." index="1"]
|
||||
|
||||
editor/display_folded = true
|
||||
position = Vector2( 50, 240 )
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
z_index = 2
|
||||
z_as_relative = false
|
||||
_sections_unfolded = [ "Transform", "Z Index" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Icon" type="AnimatedSprite" parent="Back" index="0"]
|
||||
|
||||
position = Vector2( 190, 530 )
|
||||
frames = SubResource( 1 )
|
||||
animation = "default"
|
||||
|
||||
[node name="Button" type="Button" parent="Back" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_top = 450.0
|
||||
margin_right = 300.0
|
||||
margin_bottom = 600.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="BuyTurret" type="Node2D" parent="." index="2"]
|
||||
|
||||
editor/display_folded = true
|
||||
visible = false
|
||||
position = Vector2( 190, 140 )
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
z_index = 2
|
||||
_sections_unfolded = [ "Transform", "Z Index" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Icon" type="AnimatedSprite" parent="BuyTurret" index="0"]
|
||||
|
||||
position = Vector2( 190, 530 )
|
||||
frames = SubResource( 2 )
|
||||
animation = "default"
|
||||
|
||||
[node name="Button" type="Button" parent="BuyTurret" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -360.0
|
||||
margin_top = 80.0
|
||||
margin_right = 720.0
|
||||
margin_bottom = 960.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Accept" type="Node2D" parent="." index="3"]
|
||||
|
||||
editor/display_folded = true
|
||||
visible = false
|
||||
position = Vector2( 820, 240 )
|
||||
scale = Vector2( 0.5, 0.5 )
|
||||
_sections_unfolded = [ "Transform" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Icon" type="AnimatedSprite" parent="Accept" index="0"]
|
||||
|
||||
position = Vector2( 190, 530 )
|
||||
frames = SubResource( 3 )
|
||||
animation = "default"
|
||||
|
||||
[node name="Button" type="Button" parent="Accept" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 96.0
|
||||
margin_top = 412.0
|
||||
margin_right = 296.0
|
||||
margin_bottom = 612.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Turret" parent="." index="4" instance=ExtResource( 5 )]
|
||||
|
||||
visible = false
|
||||
position = Vector2( 550, 300 )
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
|
||||
[node name="Upgrade" type="Node2D" parent="." index="5"]
|
||||
|
||||
visible = false
|
||||
position = Vector2( 0, 181 )
|
||||
|
||||
[node name="Button" type="Button" parent="Upgrade" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 430.0
|
||||
margin_top = 50.0
|
||||
margin_right = 640.0
|
||||
margin_bottom = 200.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Upgrade"
|
||||
flat = false
|
||||
align = 1
|
||||
|
||||
[node name="Icon" type="AnimatedSprite" parent="Upgrade" index="1"]
|
||||
|
||||
animation = "default"
|
||||
|
||||
[connection signal="pressed" from="Back/Button" to="." method="backButton"]
|
||||
|
||||
[connection signal="pressed" from="BuyTurret/Button" to="." method="buyTurret"]
|
||||
|
||||
[connection signal="pressed" from="Accept/Button" to="." method="acceptTurret"]
|
||||
|
||||
[connection signal="pressed" from="Upgrade/Button" to="." method="upgradeTurret"]
|
||||
|
||||
|
|
@ -22,31 +22,60 @@ extends Node
|
|||
signal refund
|
||||
signal speed_upgrade
|
||||
signal bullet_delay_upgrade
|
||||
signal laser_damage_upgrade
|
||||
signal double_laser_upgrade
|
||||
signal laser_penetration_upgrade
|
||||
signal add_laser
|
||||
signal plasma_lasers
|
||||
signal menu_closed
|
||||
signal change_color
|
||||
signal taste_the_rainbow
|
||||
signal unlock_turrets
|
||||
signal buy_turret
|
||||
signal turret_menu
|
||||
|
||||
const DEFAULT_TURRET_COST = 1000
|
||||
var turret_cost = DEFAULT_TURRET_COST
|
||||
|
||||
var laser_damage_tier
|
||||
var bullet_delay_tier
|
||||
var shooting_speed_tier
|
||||
var laser_penetration_tier
|
||||
var double_lasers
|
||||
var turrets_unlocked = false
|
||||
var has_turret
|
||||
|
||||
func _ready():
|
||||
get_tree().paused = true
|
||||
bullet_delay_tier = get_parent().bullet_delay_tier
|
||||
$ShootingSpeedUpgrade/Icon.frame = bullet_delay_tier
|
||||
if get_tree().has_network_peer():
|
||||
$ColorRect.color = Color(1,1,1,0.5)
|
||||
|
||||
if get_parent().next_laser_damage_upgrade_cost == 0:
|
||||
$LaserDamageUpgrade/Cost.text = str("Sold Out!")
|
||||
else:
|
||||
$LaserDamageUpgrade/Cost.text = str("$", get_parent().next_laser_damage_upgrade_cost)
|
||||
|
||||
if get_parent().next_bullet_delay_upgrade_cost == 0:
|
||||
$ShootingSpeedUpgrade/Cost.text = str("Sold Out!")
|
||||
else:
|
||||
$ShootingSpeedUpgrade/Cost.text = str("$", get_parent().next_bullet_delay_upgrade_cost)
|
||||
|
||||
if get_parent().next_penetration_upgrade_cost == 0:
|
||||
$LaserPenetrationUpgrade/Cost.text = str("Sold Out!")
|
||||
else:
|
||||
$LaserPenetrationUpgrade/Cost.text = str("$", get_parent().next_penetration_upgrade_cost)
|
||||
|
||||
$ColorRect.color = Color(0,0,0,1)
|
||||
|
||||
func _process(delta):
|
||||
$ShootingSpeedUpgrade/Icon.frame = bullet_delay_tier
|
||||
$ShootingSpeedUpgrade/Icon.frame = bullet_delay_tier-1
|
||||
$LaserDamageUpgrade/Icon.frame = laser_damage_tier-1
|
||||
$LaserPenetrationUpgrade/Icon.frame = laser_penetration_tier-1
|
||||
|
||||
if (Input.is_action_pressed("ui_quit")):
|
||||
get_tree().quit()
|
||||
if Input.is_action_pressed("ui_accept"):
|
||||
_on_Button_pressed()
|
||||
#if Input.is_action_pressed("ui_accept"):
|
||||
# _on_Button_pressed()
|
||||
|
||||
func _on_Button_pressed():
|
||||
get_tree().paused = false
|
||||
|
@ -63,6 +92,10 @@ func _on_ShootingSpeedUpgrade_pressed():
|
|||
get_tree().paused = false
|
||||
emit_signal("bullet_delay_upgrade")
|
||||
bullet_delay_tier = get_parent().bullet_delay_tier
|
||||
if get_parent().next_bullet_delay_upgrade_cost == 0:
|
||||
$ShootingSpeedUpgrade/Cost.text = str("Sold Out!")
|
||||
else:
|
||||
$ShootingSpeedUpgrade/Cost.text = str("$", get_parent().next_bullet_delay_upgrade_cost)
|
||||
|
||||
func _on_DoubleLaserUpgrade_pressed():
|
||||
get_tree().paused = false
|
||||
|
@ -89,7 +122,6 @@ func _on_MediumSpringGreen_pressed():
|
|||
|
||||
func _on_Tomato_pressed():
|
||||
emit_signal("change_color", "ff3e2d")
|
||||
prints("put tomato in dere")
|
||||
|
||||
func _on_DarkenedLawnGreen_pressed():
|
||||
emit_signal("change_color", "7bd126")
|
||||
|
@ -97,7 +129,39 @@ func _on_DarkenedLawnGreen_pressed():
|
|||
func _on_DeepSkyBlue_pressed():
|
||||
emit_signal("change_color", "00bfff")
|
||||
|
||||
#### NOT PAUSING GAME? ####
|
||||
func _on_Rainbow_pressed():
|
||||
get_tree().paused = false
|
||||
emit_signal("taste_the_rainbow")
|
||||
|
||||
func _on_Laser_Damage_Upgrade():
|
||||
get_tree().paused = false
|
||||
emit_signal("laser_damage_upgrade")
|
||||
laser_damage_tier = get_parent().laser_damage_tier
|
||||
if get_parent().next_laser_damage_upgrade_cost == 0:
|
||||
$LaserDamageUpgrade/Cost.text = str("Sold Out!")
|
||||
else:
|
||||
$LaserDamageUpgrade/Cost.text = str("$", get_parent().next_laser_damage_upgrade_cost)
|
||||
|
||||
func _on_Laser_Penetration_Upgrade():
|
||||
get_tree().paused = false
|
||||
emit_signal("laser_penetration_upgrade")
|
||||
laser_penetration_tier = get_parent().laser_penetration_tier
|
||||
$LaserPenetrationUpgrade/Icon.frame = laser_penetration_tier
|
||||
if get_parent().next_penetration_upgrade_cost == 0:
|
||||
$LaserPenetrationUpgrade/Cost.text = str("Sold Out!")
|
||||
else:
|
||||
$LaserPenetrationUpgrade/Cost.text = str("$", get_parent().next_penetration_upgrade_cost)
|
||||
|
||||
func openTurretMenu():
|
||||
emit_signal("turret_menu")
|
||||
|
||||
func _on_TurretsButton_pressed():
|
||||
get_tree().paused = false
|
||||
emit_signal("unlock_turrets")
|
||||
turrets_unlocked = get_parent().turrets_unlocked
|
||||
"""
|
||||
if get_parent().money >= turret_cost:
|
||||
var turret = preload("res://Turret.tscn").instance()
|
||||
turret.set_name(turret.get_name())
|
||||
newTurret = turret.get_name()
|
||||
"""
|
||||
|
|
319
UpgradeMenu.tscn
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=18 format=2]
|
||||
[gd_scene load_steps=35 format=2]
|
||||
|
||||
[ext_resource path="res://UpgradeMenu.gd" type="Script" id=1]
|
||||
[ext_resource path="res://art/upgrade_menu/shootingspeed1.png" type="Texture" id=2]
|
||||
|
@ -6,13 +6,25 @@
|
|||
[ext_resource path="res://art/upgrade_menu/shootingspeed3.png" type="Texture" id=4]
|
||||
[ext_resource path="res://art/upgrade_menu/shootingspeed4.png" type="Texture" id=5]
|
||||
[ext_resource path="res://art/upgrade_menu/shootingspeed5.png" type="Texture" id=6]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed1.png" type="Texture" id=7]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed2.png" type="Texture" id=8]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed3.png" type="Texture" id=9]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed4.png" type="Texture" id=10]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed5.png" type="Texture" id=11]
|
||||
[ext_resource path="res://art/ColorSelect.png" type="Texture" id=12]
|
||||
[ext_resource path="res://art/upgrade_menu/doublelasers.png" type="Texture" id=13]
|
||||
[ext_resource path="res://art/hand-numbs.ttf" type="DynamicFontData" id=7]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed1.png" type="Texture" id=8]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed2.png" type="Texture" id=9]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed3.png" type="Texture" id=10]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed4.png" type="Texture" id=11]
|
||||
[ext_resource path="res://art/upgrade_menu/shipspeed5.png" type="Texture" id=12]
|
||||
[ext_resource path="res://art/ColorSelect.png" type="Texture" id=13]
|
||||
[ext_resource path="res://art/upgrade_menu/doublelasers.png" type="Texture" id=14]
|
||||
[ext_resource path="res://art/upgrade_menu/shootingdamage1.png" type="Texture" id=15]
|
||||
[ext_resource path="res://art/upgrade_menu/shootingdamage2.png" type="Texture" id=16]
|
||||
[ext_resource path="res://art/upgrade_menu/shootingdamage3.png" type="Texture" id=17]
|
||||
[ext_resource path="res://art/upgrade_menu/shootingdamage4.png" type="Texture" id=18]
|
||||
[ext_resource path="res://art/upgrade_menu/shootingdamage5.png" type="Texture" id=19]
|
||||
[ext_resource path="res://art/upgrade_menu/laserpenetration1.png" type="Texture" id=20]
|
||||
[ext_resource path="res://art/upgrade_menu/laserpenetration2.png" type="Texture" id=21]
|
||||
[ext_resource path="res://art/upgrade_menu/laserpenetration3.png" type="Texture" id=22]
|
||||
[ext_resource path="res://art/upgrade_menu/laserpenetration4.png" type="Texture" id=23]
|
||||
[ext_resource path="res://art/upgrade_menu/laserpenetration5.png" type="Texture" id=24]
|
||||
[ext_resource path="res://art/upgrade_menu/buyturrets.png" type="Texture" id=25]
|
||||
|
||||
[sub_resource type="Theme" id=1]
|
||||
|
||||
|
@ -26,20 +38,63 @@ animations = [ {
|
|||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
[sub_resource type="DynamicFont" id=3]
|
||||
|
||||
size = 40
|
||||
use_mipmaps = false
|
||||
use_filter = true
|
||||
font_data = ExtResource( 7 )
|
||||
_sections_unfolded = [ "Font", "Settings" ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ) ],
|
||||
"frames": [ ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ) ],
|
||||
"loop": true,
|
||||
"name": "New Anim",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
_sections_unfolded = [ "Resource" ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
[sub_resource type="SpriteFrames" id=5]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 13 ) ],
|
||||
"frames": [ ExtResource( 14 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=6]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 15 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 18 ), ExtResource( 19 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="DynamicFont" id=7]
|
||||
|
||||
size = 80
|
||||
use_mipmaps = false
|
||||
use_filter = true
|
||||
font_data = ExtResource( 7 )
|
||||
_sections_unfolded = [ "Font", "Settings" ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=8]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 20 ), ExtResource( 21 ), ExtResource( 22 ), ExtResource( 23 ), ExtResource( 24 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="SpriteFrames" id=9]
|
||||
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 25 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
|
@ -90,20 +145,21 @@ toggle_mode = false
|
|||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
text = "Resume"
|
||||
text = "Continue"
|
||||
flat = false
|
||||
align = 1
|
||||
|
||||
[node name="Refund" type="Button" parent="." index="2"]
|
||||
|
||||
visible = false
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 860.0
|
||||
margin_top = 250.0
|
||||
margin_right = 984.0
|
||||
margin_bottom = 353.0
|
||||
margin_left = 840.0
|
||||
margin_top = 440.0
|
||||
margin_right = 964.0
|
||||
margin_bottom = 543.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
|
@ -121,15 +177,17 @@ align = 1
|
|||
|
||||
[node name="ShootingSpeedUpgrade" type="Node" parent="." index="3"]
|
||||
|
||||
editor/display_folded = true
|
||||
|
||||
[node name="Button" type="Button" parent="ShootingSpeedUpgrade" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 400.0
|
||||
margin_left = 249.0
|
||||
margin_top = 40.0
|
||||
margin_right = 660.0
|
||||
margin_right = 505.0
|
||||
margin_bottom = 198.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
|
@ -147,13 +205,41 @@ align = 1
|
|||
|
||||
[node name="Icon" type="AnimatedSprite" parent="ShootingSpeedUpgrade" index="1"]
|
||||
|
||||
position = Vector2( 530, 120 )
|
||||
light_mask = 0
|
||||
position = Vector2( 375, 120 )
|
||||
scale = Vector2( 0.392712, 0.392712 )
|
||||
frames = SubResource( 2 )
|
||||
animation = "default"
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
|
||||
[node name="Cost" type="Label" parent="ShootingSpeedUpgrade" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = 327.0
|
||||
margin_top = 22.0
|
||||
margin_right = 536.0
|
||||
margin_bottom = 85.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
|
||||
custom_fonts/font = SubResource( 3 )
|
||||
custom_colors/font_color = Color( 0.272552, 1, 0.230469, 1 )
|
||||
text = "$100"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "custom_colors", "custom_fonts" ]
|
||||
|
||||
[node name="ShipSpeedUpgrade" type="Node" parent="." index="4"]
|
||||
|
||||
editor/display_folded = true
|
||||
|
||||
[node name="Button" type="Button" parent="ShipSpeedUpgrade" index="0"]
|
||||
|
||||
visible = false
|
||||
|
@ -182,18 +268,25 @@ align = 1
|
|||
[node name="Icon" type="AnimatedSprite" parent="ShipSpeedUpgrade" index="1"]
|
||||
|
||||
visible = false
|
||||
light_mask = 0
|
||||
position = Vector2( 530, 310 )
|
||||
scale = Vector2( 0.392712, 0.392712 )
|
||||
frames = SubResource( 3 )
|
||||
frames = SubResource( 4 )
|
||||
animation = "New Anim"
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
|
||||
[node name="ColorSelect" type="Node2D" parent="." index="5"]
|
||||
|
||||
editor/display_folded = true
|
||||
light_mask = 0
|
||||
position = Vector2( 21, 0 )
|
||||
_sections_unfolded = [ "Material", "Visibility" ]
|
||||
|
||||
[node name="ColorSelectBG" type="Sprite" parent="ColorSelect" index="0"]
|
||||
|
||||
position = Vector2( 150, 210 )
|
||||
position = Vector2( 120, 210 )
|
||||
scale = Vector2( 0.179688, 0.179687 )
|
||||
texture = ExtResource( 12 )
|
||||
texture = ExtResource( 13 )
|
||||
|
||||
[node name="Goldenrod" type="Button" parent="ColorSelect/ColorSelectBG" index="0"]
|
||||
|
||||
|
@ -438,7 +531,9 @@ align = 1
|
|||
[node name="DoubleLaserUpgrade" type="Node2D" parent="." index="6"]
|
||||
|
||||
editor/display_folded = true
|
||||
position = Vector2( -150, -10 )
|
||||
light_mask = 0
|
||||
position = Vector2( -320, -30 )
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
@ -447,9 +542,9 @@ __meta__ = {
|
|||
|
||||
position = Vector2( 959, 151.811 )
|
||||
scale = Vector2( 0.154596, 0.154596 )
|
||||
frames = SubResource( 4 )
|
||||
frames = SubResource( 5 )
|
||||
animation = "default"
|
||||
_sections_unfolded = [ "Visibility" ]
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
|
||||
[node name="Button" type="Button" parent="DoubleLaserUpgrade" index="1"]
|
||||
|
||||
|
@ -475,6 +570,172 @@ group = null
|
|||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="LaserDamageUpgrade" type="Node2D" parent="." index="7"]
|
||||
|
||||
light_mask = 0
|
||||
position = Vector2( 371, 300 )
|
||||
scale = Vector2( 0.4, 0.4 )
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Icon" type="AnimatedSprite" parent="LaserDamageUpgrade" index="0"]
|
||||
|
||||
frames = SubResource( 6 )
|
||||
animation = "default"
|
||||
|
||||
[node name="Button" type="Button" parent="LaserDamageUpgrade" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -320.0
|
||||
margin_top = -200.0
|
||||
margin_right = 320.0
|
||||
margin_bottom = 200.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Cost" type="Label" parent="LaserDamageUpgrade" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -79.0
|
||||
margin_top = -228.0
|
||||
margin_right = 161.0
|
||||
margin_bottom = -165.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
|
||||
custom_fonts/font = SubResource( 7 )
|
||||
custom_colors/font_color = Color( 0.272552, 1, 0.230469, 1 )
|
||||
text = "$400"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "custom_colors", "custom_fonts" ]
|
||||
|
||||
[node name="LaserPenetrationUpgrade" type="Node2D" parent="." index="8"]
|
||||
|
||||
light_mask = 0
|
||||
position = Vector2( 660, 300 )
|
||||
scale = Vector2( 0.4, 0.4 )
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Icon" type="AnimatedSprite" parent="LaserPenetrationUpgrade" index="0"]
|
||||
|
||||
frames = SubResource( 8 )
|
||||
animation = "default"
|
||||
|
||||
[node name="Button" type="Button" parent="LaserPenetrationUpgrade" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -325.0
|
||||
margin_top = -200.0
|
||||
margin_right = 325.0
|
||||
margin_bottom = 200.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[node name="Cost" type="Label" parent="LaserPenetrationUpgrade" index="2"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -98.0
|
||||
margin_top = -228.0
|
||||
margin_right = 142.0
|
||||
margin_bottom = -165.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
|
||||
custom_fonts/font = SubResource( 7 )
|
||||
custom_colors/font_color = Color( 0.272552, 1, 0.230469, 1 )
|
||||
text = "$400"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
_sections_unfolded = [ "custom_colors", "custom_fonts" ]
|
||||
|
||||
[node name="Turrets" type="Node2D" parent="." index="9"]
|
||||
|
||||
editor/display_folded = true
|
||||
light_mask = 0
|
||||
position = Vector2( 900, 200 )
|
||||
scale = Vector2( 0.2, 0.2 )
|
||||
_sections_unfolded = [ "Transform", "Visibility" ]
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="Icon" type="AnimatedSprite" parent="Turrets" index="0"]
|
||||
|
||||
frames = SubResource( 9 )
|
||||
animation = "default"
|
||||
|
||||
[node name="Button" type="Button" parent="Turrets" index="1"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
margin_left = -500.0
|
||||
margin_top = -500.0
|
||||
margin_right = 550.0
|
||||
margin_bottom = 450.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
focus_mode = 2
|
||||
mouse_filter = 0
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
toggle_mode = false
|
||||
enabled_focus_mode = 2
|
||||
shortcut = null
|
||||
group = null
|
||||
flat = true
|
||||
align = 1
|
||||
|
||||
[connection signal="pressed" from="Resume" to="." method="_on_Button_pressed"]
|
||||
|
||||
[connection signal="pressed" from="Refund" to="." method="_on_Refund_pressed"]
|
||||
|
@ -505,4 +766,10 @@ align = 1
|
|||
|
||||
[connection signal="pressed" from="DoubleLaserUpgrade/Button" to="." method="_on_DoubleLaserUpgrade_pressed"]
|
||||
|
||||
[connection signal="pressed" from="LaserDamageUpgrade/Button" to="." method="_on_Laser_Damage_Upgrade"]
|
||||
|
||||
[connection signal="pressed" from="LaserPenetrationUpgrade/Button" to="." method="_on_Laser_Penetration_Upgrade"]
|
||||
|
||||
[connection signal="pressed" from="Turrets/Button" to="." method="_on_TurretsButton_pressed"]
|
||||
|
||||
|
||||
|
|
After Width: | Height: | Size: 648 KiB |
After Width: | Height: | Size: 3.9 MiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 160 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 193 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 173 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 158 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 26 KiB |
BIN
art/bg.png
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 164 KiB |
|
@ -0,0 +1,627 @@
|
|||
SplineFontDB: 3.0
|
||||
FontName: Untitled1
|
||||
FullName: Untitled1
|
||||
FamilyName: Untitled1
|
||||
Weight: Regular
|
||||
Copyright: Copyright (c) 2018, Sage
|
||||
UComments: "2018-6-23: Created with FontForge (http://fontforge.org)"
|
||||
Version: 001.000
|
||||
ItalicAngle: 0
|
||||
UnderlinePosition: -100
|
||||
UnderlineWidth: 50
|
||||
Ascent: 800
|
||||
Descent: 200
|
||||
InvalidEm: 0
|
||||
LayerCount: 2
|
||||
Layer: 0 0 "Back" 1
|
||||
Layer: 1 0 "Fore" 0
|
||||
XUID: [1021 912 -219086254 5845647]
|
||||
StyleMap: 0x0000
|
||||
FSType: 0
|
||||
OS2Version: 0
|
||||
OS2_WeightWidthSlopeOnly: 0
|
||||
OS2_UseTypoMetrics: 1
|
||||
CreationTime: 1529764691
|
||||
ModificationTime: 1529767606
|
||||
OS2TypoAscent: 0
|
||||
OS2TypoAOffset: 1
|
||||
OS2TypoDescent: 0
|
||||
OS2TypoDOffset: 1
|
||||
OS2TypoLinegap: 90
|
||||
OS2WinAscent: 0
|
||||
OS2WinAOffset: 1
|
||||
OS2WinDescent: 0
|
||||
OS2WinDOffset: 1
|
||||
HheadAscent: 0
|
||||
HheadAOffset: 1
|
||||
HheadDescent: 0
|
||||
HheadDOffset: 1
|
||||
MarkAttachClasses: 1
|
||||
DEI: 91125
|
||||
Encoding: ISO8859-1
|
||||
UnicodeInterp: none
|
||||
NameList: AGL For New Fonts
|
||||
DisplaySize: -48
|
||||
AntiAlias: 1
|
||||
FitToEm: 0
|
||||
WidthSeparation: 150
|
||||
WinInfo: 0 38 14
|
||||
BeginPrivate: 0
|
||||
EndPrivate
|
||||
AnchorClass2: "hhh"""
|
||||
BeginChars: 256 13
|
||||
|
||||
StartChar: A
|
||||
Encoding: 65 65 0
|
||||
Width: 150
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: zero
|
||||
Encoding: 48 48 1
|
||||
Width: 649
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
HStem: 47 118<297.936 415.761> 651 117<224.578 442.698>
|
||||
VStem: 52 116<376.505 571.394> 475 118<302.688 611.105>
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
263 766 m 0
|
||||
273 767 290 768 309 768 c 0
|
||||
345 768 389 766 411 762 c 0
|
||||
530 742 581 683 591 553 c 0
|
||||
592 541 593 527 593 511 c 0
|
||||
593 414 572 264 546 185 c 0
|
||||
534 148 526 133 501 103 c 0
|
||||
469 66 425 47 373 47 c 0
|
||||
347 47 319 51 290 61 c 0
|
||||
252 74 191 108 171 129 c 0
|
||||
146 154 121 208 92 295 c 0
|
||||
61 388 52 431 52 480 c 0
|
||||
52 485 52 490 52 495 c 0
|
||||
58 607 112 709 186 746 c 0
|
||||
197 751 234 761 263 766 c 0
|
||||
409 643 m 0
|
||||
391 648 341 651 307 651 c 0
|
||||
296 651 287 651 281 650 c 0
|
||||
223 641 205 624 182 551 c 0
|
||||
173 525 168 504 168 481 c 0
|
||||
168 445 180 404 205 329 c 0
|
||||
236 237 247 215 269 204 c 0
|
||||
278 200 290 192 296 188 c 0
|
||||
314 176 351 165 374 165 c 0
|
||||
395 165 398 166 411 180 c 0
|
||||
429 200 439 227 453 299 c 0
|
||||
468 380 471 410 474 483 c 0
|
||||
474 496 475 508 475 519 c 0
|
||||
475 568 470 593 459 612 c 0
|
||||
449 628 438 635 409 643 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: one
|
||||
Encoding: 49 49 2
|
||||
Width: 437
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
176 725 m 0
|
||||
185 730 193 732 202 732 c 0
|
||||
221 732 239 720 254 695 c 0
|
||||
262 682 266 674 266 641 c 0
|
||||
266 618 264 582 261 523 c 0
|
||||
258 477 254 383 252 315 c 0
|
||||
250 247 247 179 246 165 c 2
|
||||
243 138 l 1
|
||||
295 138 l 2
|
||||
334 138 349 137 360 132 c 0
|
||||
380 122 391 103 391 82 c 0
|
||||
391 65 383 48 367 36 c 0
|
||||
356 28 349 27 288 25 c 0
|
||||
251 23 211 20 199 17 c 0
|
||||
187 15 156 12 130 12 c 0
|
||||
90 12 82 13 71 20 c 0
|
||||
53 30 43 48 43 68 c 0
|
||||
43 101 66 122 104 125 c 0
|
||||
125 127 128 129 130 137 c 0
|
||||
131 142 134 203 136 273 c 0
|
||||
138 343 141 430 143 466 c 0
|
||||
145 503 146 533 146 533 c 0
|
||||
145 534 139 532 132 530 c 0
|
||||
127 528 122 527 117 527 c 0
|
||||
97 527 78 540 68 559 c 0
|
||||
64 567 62 576 62 584 c 0
|
||||
62 593 65 602 69 611 c 0
|
||||
79 630 160 717 176 725 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: two
|
||||
Encoding: 50 50 3
|
||||
Width: 711
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
198 739 m 0
|
||||
207 743 218 745 231 745 c 0
|
||||
258 745 292 737 325 721 c 0
|
||||
344 712 360 699 381 676 c 0
|
||||
472 579 527 437 527 302 c 2
|
||||
527 270 l 1
|
||||
548 257 l 2
|
||||
575 241 632 186 649 161 c 0
|
||||
657 148 661 136 661 124 c 0
|
||||
661 113 658 104 653 94 c 0
|
||||
641 75 621 64 601 64 c 0
|
||||
594 64 586 65 579 68 c 0
|
||||
573 71 550 90 528 111 c 2
|
||||
489 150 l 1
|
||||
480 137 l 2
|
||||
464 115 425 76 408 64 c 0
|
||||
378 43 336 32 298 32 c 0
|
||||
288 32 278 32 269 34 c 0
|
||||
216 44 114 98 86 132 c 0
|
||||
68 152 51 193 48 219 c 0
|
||||
47 224 47 228 47 232 c 0
|
||||
47 280 76 322 122 338 c 0
|
||||
137 344 153 347 174 347 c 0
|
||||
215 347 274 334 380 305 c 0
|
||||
393 301 404 299 405 300 c 0
|
||||
405 300 406 302 406 304 c 0
|
||||
406 322 396 388 390 412 c 0
|
||||
371 476 328 555 289 594 c 0
|
||||
272 612 242 625 218 625 c 0
|
||||
203 625 182 638 171 655 c 0
|
||||
166 663 164 672 164 682 c 0
|
||||
164 704 177 728 198 739 c 0
|
||||
270 206 m 0
|
||||
225 217 198 223 185 223 c 0
|
||||
179 223 176 222 176 219 c 0
|
||||
176 203 271 156 303 156 c 0
|
||||
320 156 352 170 354 179 c 0
|
||||
355 182 352 185 347 186 c 0
|
||||
341 187 306 196 270 206 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: three
|
||||
Encoding: 51 51 4
|
||||
Width: 538
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
194 736 m 0
|
||||
208 743 217 745 243 745 c 0
|
||||
282 745 311 738 351 718 c 0
|
||||
387 701 419 672 432 643 c 0
|
||||
439 629 442 608 442 586 c 0
|
||||
442 550 434 508 418 474 c 0
|
||||
411 459 405 445 405 444 c 0
|
||||
405 442 410 439 415 436 c 0
|
||||
460 416 486 364 486 299 c 0
|
||||
486 289 485 278 484 267 c 0
|
||||
476 200 466 171 436 126 c 0
|
||||
407 83 352 46 295 32 c 0
|
||||
268 25 212 21 172 21 c 0
|
||||
160 21 149 21 141 22 c 0
|
||||
79 31 44 56 44 89 c 0
|
||||
44 97 46 106 50 115 c 0
|
||||
59 134 77 145 97 145 c 0
|
||||
105 145 114 143 122 140 c 0
|
||||
135 135 163 132 194 132 c 0
|
||||
224 132 255 135 272 140 c 0
|
||||
314 153 344 178 359 214 c 0
|
||||
369 236 375 276 375 303 c 0
|
||||
375 315 374 325 371 330 c 0
|
||||
366 340 341 349 322 349 c 0
|
||||
310 349 300 346 283 335 c 0
|
||||
255 317 230 308 208 308 c 0
|
||||
186 308 169 317 155 336 c 0
|
||||
149 343 147 354 147 366 c 0
|
||||
147 379 150 393 158 403 c 0
|
||||
171 421 200 437 236 448 c 0
|
||||
260 456 267 460 287 479 c 0
|
||||
313 505 324 527 331 564 c 0
|
||||
332 571 333 577 333 582 c 0
|
||||
333 601 324 609 297 622 c 0
|
||||
274 632 268 633 232 633 c 0
|
||||
187 634 177 638 167 660 c 0
|
||||
163 669 161 678 161 686 c 0
|
||||
161 707 173 725 194 736 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: four
|
||||
Encoding: 52 52 5
|
||||
Width: 517
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
HStem: 421 118<217 318.453>
|
||||
VStem: 156 107<539.012 774.158> 354 106<37.104 191.677> 391 106<570.5 764.367> 403 109<243.476 456 570 748.169>
|
||||
CounterMasks: 1 58
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
299 460 m 4xc8
|
||||
291 460 128 421 120 421 c 4
|
||||
114 421 100 425 90 430 c 4
|
||||
68 441 56 460 56 482 c 4
|
||||
56 483 56 484 56 485 c 4
|
||||
56 494 56 558 56 628 c 4
|
||||
56 767 57 765 82 780 c 4
|
||||
89 784 97 787 106 787 c 4
|
||||
126 787 147 775 156 756 c 4
|
||||
162 744 163 731 163 641 c 4
|
||||
163 555 164 539 169 539 c 4
|
||||
171 539 193 544 216 550 c 4
|
||||
240 556 268 563 281 565 c 6
|
||||
303 570 l 5
|
||||
303 602 l 5xc8
|
||||
303 633 296 688 291 722 c 5
|
||||
291 727 l 6
|
||||
291 755 313 776 342 776 c 4
|
||||
367 776 389 759 397 734 c 4xd0
|
||||
402 721 411 614 411 571 c 4
|
||||
411 568 416 564 426 561 c 4
|
||||
447 555 457 548 463 534 c 4
|
||||
467 526 469 518 469 510 c 4
|
||||
469 485 451 463 424 458 c 6
|
||||
412 456 l 5
|
||||
412 371 l 5xc8
|
||||
402 276 385 210 372 146 c 4
|
||||
367 122 360 94 360 82 c 4
|
||||
360 51 337 26 303 26 c 4
|
||||
273 26 254 46 254 81 c 4xe0
|
||||
254 100 258 127 266 164 c 4
|
||||
281 235 303 356 303 442 c 4
|
||||
303 457 304 460 299 460 c 4xc8
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: five
|
||||
Encoding: 53 53 6
|
||||
Width: 493
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
252 730 m 0
|
||||
262 732 276 735 283 735 c 0
|
||||
283 735 284 735 284 735 c 0
|
||||
313 735 331 711 331 688 c 0
|
||||
331 672 324 657 308 647 c 0
|
||||
290 636 253 629 210 629 c 0
|
||||
166 629 155 627 155 618 c 0
|
||||
155 618 155 617 155 617 c 0
|
||||
155 614 161 584 169 552 c 0
|
||||
176 519 183 489 184 485 c 0
|
||||
185 479 189 478 271 475 c 0
|
||||
369 471 378 469 405 444 c 0
|
||||
431 421 443 392 443 354 c 0
|
||||
443 345 442 335 441 325 c 0
|
||||
436 288 427 260 412 235 c 0
|
||||
380 183 362 156 342 131 c 0
|
||||
300 79 246 51 190 51 c 0
|
||||
176 51 162 52 148 56 c 0
|
||||
113 65 73 92 62 114 c 0
|
||||
59 120 57 129 57 137 c 0
|
||||
57 146 59 155 63 161 c 0
|
||||
73 176 87 184 102 184 c 0
|
||||
113 184 124 180 135 172 c 0
|
||||
158 155 174 147 190 147 c 0
|
||||
201 147 212 151 225 157 c 0
|
||||
250 170 267 189 304 246 c 0
|
||||
337 298 344 314 345 343 c 0
|
||||
345 347 345 350 345 353 c 0
|
||||
345 376 338 375 262 379 c 0
|
||||
234 380 217 381 206 381 c 0
|
||||
188 381 184 379 174 375 c 0
|
||||
164 370 154 368 145 368 c 0
|
||||
126 368 111 378 103 396 c 0
|
||||
100 403 94 426 91 446 c 0
|
||||
86 485 66 570 58 593 c 0
|
||||
53 607 51 620 51 632 c 0
|
||||
51 665 69 690 104 708 c 0
|
||||
131 721 151 725 197 725 c 0
|
||||
217 725 242 727 252 730 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: six
|
||||
Encoding: 54 54 7
|
||||
Width: 435
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
208 736 m 0
|
||||
214 739 220 741 226 741 c 0
|
||||
232 741 239 739 246 735 c 0
|
||||
263 726 272 711 272 693 c 0
|
||||
272 686 271 678 268 671 c 0
|
||||
266 665 254 652 243 642 c 0
|
||||
207 613 187 590 180 575 c 0
|
||||
175 565 173 547 170 508 c 0
|
||||
169 487 168 468 168 459 c 0
|
||||
168 456 168 454 168 454 c 0
|
||||
169 453 175 454 182 456 c 0
|
||||
191 459 206 460 221 460 c 0
|
||||
240 460 260 458 272 454 c 0
|
||||
329 435 359 406 375 356 c 0
|
||||
380 342 382 323 382 302 c 0
|
||||
382 279 379 254 373 232 c 0
|
||||
346 125 306 77 234 63 c 0
|
||||
227 62 219 61 211 61 c 0
|
||||
159 61 102 89 84 126 c 0
|
||||
68 156 60 217 60 290 c 0
|
||||
60 315 61 341 63 368 c 0
|
||||
66 404 71 466 73 504 c 0
|
||||
76 543 80 583 83 592 c 0
|
||||
89 614 105 642 125 665 c 0
|
||||
144 686 194 729 208 736 c 0
|
||||
256 356 m 0
|
||||
246 360 235 363 223 363 c 0
|
||||
211 363 199 360 188 356 c 0
|
||||
159 346 157 349 157 308 c 0
|
||||
157 303 157 297 157 291 c 0
|
||||
157 244 164 181 170 171 c 0
|
||||
174 164 191 160 208 160 c 0
|
||||
218 160 229 161 235 165 c 0
|
||||
260 180 285 251 285 299 c 0
|
||||
285 302 285 305 285 307 c 0
|
||||
283 336 276 348 256 356 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: seven
|
||||
Encoding: 55 55 8
|
||||
Width: 531
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
311 765 m 0
|
||||
331 767 349 768 364 768 c 0
|
||||
410 768 438 759 459 737 c 0
|
||||
474 721 481 704 481 686 c 0
|
||||
481 673 477 659 470 645 c 0
|
||||
466 636 442 598 416 559 c 0
|
||||
321 414 301 377 265 282 c 0
|
||||
254 253 239 213 230 194 c 0
|
||||
222 176 207 140 196 116 c 0
|
||||
164 40 157 32 125 29 c 0
|
||||
124 29 123 29 122 29 c 0
|
||||
92 29 67 53 67 83 c 0
|
||||
67 98 84 144 109 198 c 0
|
||||
128 240 141 270 168 343 c 0
|
||||
198 422 240 498 320 617 c 0
|
||||
331 635 341 651 341 653 c 0
|
||||
341 653 339 653 336 653 c 0
|
||||
328 653 309 652 288 650 c 0
|
||||
268 649 230 648 195 648 c 0
|
||||
182 648 170 648 158 648 c 0
|
||||
84 649 78 650 67 658 c 0
|
||||
51 669 44 685 44 702 c 0
|
||||
44 722 54 741 75 752 c 0
|
||||
90 760 95 761 189 761 c 0
|
||||
243 762 297 763 311 765 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: eight
|
||||
Encoding: 56 56 9
|
||||
Width: 559
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
307 752 m 0
|
||||
328 758 348 764 352 764 c 0
|
||||
357 765 369 761 381 757 c 0
|
||||
463 730 507 680 507 617 c 0
|
||||
507 608 506 599 504 589 c 0
|
||||
495 547 471 502 437 465 c 2
|
||||
418 445 l 1
|
||||
431 426 l 2
|
||||
458 391 472 355 476 312 c 0
|
||||
476 309 476 305 476 301 c 0
|
||||
476 258 457 193 430 154 c 0
|
||||
410 123 367 78 339 60 c 0
|
||||
293 30 249 15 208 15 c 0
|
||||
168 15 131 29 99 58 c 0
|
||||
78 77 68 93 57 124 c 0
|
||||
49 145 48 154 48 189 c 0
|
||||
48 222 49 233 55 251 c 0
|
||||
72 299 96 330 170 391 c 0
|
||||
194 410 212 427 212 430 c 0
|
||||
211 431 201 435 190 438 c 0
|
||||
162 447 133 475 125 501 c 0
|
||||
122 513 120 531 120 548 c 0
|
||||
120 568 122 588 127 601 c 0
|
||||
141 641 189 691 246 725 c 0
|
||||
259 733 287 745 307 752 c 0
|
||||
376 652 m 0
|
||||
367 657 360 659 353 659 c 0
|
||||
347 659 340 658 331 655 c 0
|
||||
309 648 291 638 264 616 c 0
|
||||
233 591 218 570 218 549 c 0
|
||||
218 531 220 530 264 523 c 0
|
||||
283 521 305 516 312 513 c 0
|
||||
320 510 330 508 334 509 c 0
|
||||
356 515 407 588 407 615 c 0
|
||||
407 628 396 642 376 652 c 0
|
||||
366 344 m 0
|
||||
361 353 351 368 344 375 c 2
|
||||
331 390 l 1
|
||||
312 377 l 2
|
||||
291 363 200 287 179 265 c 0
|
||||
156 242 147 221 147 190 c 0
|
||||
147 161 152 145 166 133 c 0
|
||||
180 119 190 115 208 115 c 0
|
||||
208 115 209 115 209 115 c 0
|
||||
264 115 337 175 364 242 c 0
|
||||
373 265 375 274 375 298 c 0
|
||||
375 323 374 330 366 344 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: nine
|
||||
Encoding: 57 57 10
|
||||
Width: 436
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
224 753 m 0
|
||||
235 756 248 758 260 758 c 0
|
||||
286 758 312 751 328 737 c 0
|
||||
333 734 344 725 353 718 c 0
|
||||
372 704 380 696 380 677 c 0
|
||||
380 665 377 647 371 619 c 0
|
||||
365 589 358 550 354 532 c 0
|
||||
351 514 346 492 343 483 c 0
|
||||
340 473 339 468 339 460 c 0
|
||||
339 454 339 447 340 437 c 0
|
||||
342 421 347 390 351 368 c 0
|
||||
357 333 358 321 358 269 c 0
|
||||
358 165 354 57 350 47 c 0
|
||||
344 35 331 27 316 25 c 0
|
||||
315 25 315 25 314 25 c 0
|
||||
292 25 277 41 273 68 c 0
|
||||
273 70 273 75 273 81 c 0
|
||||
273 98 274 127 275 157 c 0
|
||||
277 202 278 236 278 264 c 0
|
||||
278 300 276 326 272 349 c 0
|
||||
269 368 266 385 265 387 c 0
|
||||
264 391 258 392 234 392 c 0
|
||||
206 392 203 392 186 400 c 0
|
||||
162 412 148 421 124 444 c 0
|
||||
91 475 70 505 56 542 c 0
|
||||
51 556 48 570 48 585 c 0
|
||||
48 609 55 632 68 651 c 0
|
||||
96 694 160 735 224 753 c 0
|
||||
269 677 m 0
|
||||
266 678 263 678 261 678 c 0
|
||||
256 678 250 676 233 671 c 0
|
||||
192 658 149 628 135 606 c 0
|
||||
131 599 129 592 129 585 c 0
|
||||
129 576 132 568 137 557 c 0
|
||||
150 530 189 490 214 477 c 0
|
||||
222 473 228 470 233 470 c 0
|
||||
238 470 242 473 247 478 c 0
|
||||
254 485 255 487 256 518 c 0
|
||||
257 536 261 566 265 585 c 0
|
||||
269 604 273 632 274 647 c 0
|
||||
275 675 275 675 269 677 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: dollar
|
||||
Encoding: 36 36 11
|
||||
Width: 487
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
SplineSet
|
||||
250 756 m 0
|
||||
261 762 268 762 280 757 c 0
|
||||
292 752 302 740 307 725 c 0
|
||||
309 719 310 714 310 708 c 0
|
||||
310 701 309 692 307 679 c 2
|
||||
305 669 l 1
|
||||
318 673 l 2
|
||||
333 677 343 679 353 679 c 0
|
||||
358 679 364 678 369 677 c 0
|
||||
395 672 411 653 411 629 c 0
|
||||
411 608 392 591 372 591 c 0
|
||||
367 591 361 592 356 595 c 0
|
||||
349 599 347 599 333 594 c 0
|
||||
325 592 314 588 310 586 c 2
|
||||
302 582 l 1
|
||||
304 523 l 2
|
||||
305 490 306 463 307 462 c 0
|
||||
307 462 323 459 342 457 c 0
|
||||
382 452 390 450 407 434 c 0
|
||||
429 414 438 392 440 354 c 0
|
||||
440 351 440 348 440 344 c 0
|
||||
440 309 430 280 404 244 c 0
|
||||
388 221 345 180 327 171 c 2
|
||||
311 163 l 1
|
||||
312 112 l 2
|
||||
312 104 312 98 312 92 c 0
|
||||
312 53 309 44 295 34 c 0
|
||||
288 30 281 27 274 27 c 0
|
||||
259 27 246 35 239 49 c 0
|
||||
233 59 233 66 233 112 c 2
|
||||
233 164 l 1
|
||||
226 166 l 2
|
||||
193 173 165 185 124 208 c 0
|
||||
112 215 94 224 84 228 c 0
|
||||
65 235 51 248 48 260 c 0
|
||||
47 263 47 267 47 270 c 0
|
||||
47 288 57 306 71 314 c 0
|
||||
76 317 82 318 87 318 c 0
|
||||
98 318 109 313 118 304 c 0
|
||||
129 294 216 248 226 248 c 0
|
||||
229 248 230 254 230 273 c 0
|
||||
230 288 229 310 228 343 c 2
|
||||
227 387 l 1
|
||||
195 391 l 2
|
||||
156 395 148 397 131 408 c 0
|
||||
116 418 106 435 106 451 c 0
|
||||
106 478 158 559 205 606 c 2
|
||||
224 625 l 1
|
||||
226 661 l 2
|
||||
227 681 228 706 229 716 c 0
|
||||
229 738 235 749 250 756 c 0
|
||||
353 374 m 0
|
||||
352 376 340 378 328 379 c 2
|
||||
307 381 l 1
|
||||
308 320 l 2
|
||||
308 287 310 259 310 259 c 0
|
||||
311 258 318 265 326 273 c 0
|
||||
344 292 360 323 362 340 c 0
|
||||
362 341 362 343 362 344 c 0
|
||||
362 356 358 370 353 374 c 0
|
||||
EndSplineSet
|
||||
Validated: 1
|
||||
EndChar
|
||||
|
||||
StartChar: ydieresis
|
||||
Encoding: 255 255 12
|
||||
Width: 150
|
||||
VWidth: 0
|
||||
Flags: HW
|
||||
LayerCount: 2
|
||||
Fore
|
||||
Validated: 1
|
||||
EndChar
|
||||
EndChars
|
||||
EndSplineFont
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 195 KiB |
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 57 KiB |