Skip to content

Commit

Permalink
part 14 - title screen
Browse files Browse the repository at this point in the history
  • Loading branch information
cbscribe committed Jan 30, 2019
1 parent 2edccf4 commit 2b549c2
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 3 deletions.
2 changes: 1 addition & 1 deletion maps/Map01.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _data = {
"points": PoolVector2Array( 0, 0, 0, 0, 3556.63, 965.333, 0, 0, -105.92, 9.37348, 3103.63, 965.333, -0.937348, 30.9325, -3.74939, -73.1131, 3007.54, 886.892, 0, 0, 0, 0, 3007.54, -201.478, 0, 0, 0, 0, 4868.56, -195.595, 0, 0, 0, 0, 4846.98, 963.372, 0, 0, -47.8047, 0.937348, 3733.12, 965.333, -11.2482, -124.667, 0, -34.6819, 3648.8, 1067.31, 0, 0, -9.37348, 111.544, 3646.84, 1608.55, -84.3613, 1.8747, 150.913, -0.937348, 3758.61, 1732.09, 0, 0, 0, 0, 4841.1, 1728.17, 0, 0, 0, 0, 4821.49, 963.372, 0, 0, 0, 0, 3556.63, 965.333 )
}

[node name="Map01" type="Node2D" index="0"]
[node name="Map01" type="Node2D"]

script = ExtResource( 1 )

Expand Down
3 changes: 2 additions & 1 deletion tanks/Tank.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tracks/1/keys = {
"values": [ Vector2( 0.5, 0.5 ), Vector2( 1.5, 1.5 ), Vector2( 1, 1 ) ]
}

[node name="Tank" type="KinematicBody2D"]
[node name="Tank" type="KinematicBody2D" index="0"]

input_pickable = false
collision_layer = 1
Expand Down Expand Up @@ -86,6 +86,7 @@ _sections_unfolded = [ "Region" ]

position = Vector2( -25, 0 )
rotation = -3.14159
emitting = false
draw_order = 1

[node name="Turret" type="Sprite" parent="." index="3"]
Expand Down
2 changes: 1 addition & 1 deletion ui/HUD.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tracks/0/keys = {
"values": [ ExtResource( 4 ), ExtResource( 6 ), ExtResource( 4 ), ExtResource( 6 ), ExtResource( 4 ) ]
}

[node name="HUD" type="CanvasLayer"]
[node name="HUD" type="CanvasLayer" index="0"]

layer = 1
offset = Vector2( 0, 0 )
Expand Down
241 changes: 241 additions & 0 deletions ui/TitleScreen.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
[gd_scene load_steps=9 format=2]

[ext_resource path="res://terrain/terrain_tiles.tres" type="TileSet" id=1]
[ext_resource path="res://assets/Xolonium-Regular.ttf" type="DynamicFontData" id=2]
[ext_resource path="res://tanks/EnemyTank.tscn" type="PackedScene" id=3]
[ext_resource path="res://environment/Obstacle.tscn" type="PackedScene" id=4]

[sub_resource type="DynamicFont" id=1]

size = 96
use_mipmaps = false
use_filter = false
font_data = ExtResource( 2 )
_sections_unfolded = [ "Font", "Settings" ]

[sub_resource type="DynamicFont" id=2]

size = 48
use_mipmaps = false
use_filter = false
font_data = ExtResource( 2 )
_sections_unfolded = [ "Font", "Settings" ]

[sub_resource type="Animation" id=3]

resource_name = "start"
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Title:rect_position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0, -164 ), Vector2( 0, 166 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("PlayMessage:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.6, 0.8 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ false, false, true ]
}

[sub_resource type="Curve2D" id=4]

bake_interval = 5.0
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -228.529, 98.8956, 0, 0, 37.7064, -1.07732, 831.565, 95.6752, 0, 0, 0, 0, 862.617, 132.478, 0, 0, 3.22179, 46.6086, 863.767, 314.194, 0, 0, 0, 0, 825.814, 353.298, 0, 0, -26.9564, -1.00584, 124.253, 353.298, 0, 0, 3.01751, -39.2277, 95.5004, 321.095, 0, 0, 0, 0, 62.1475, 287.742, 0, 0, 0, 0, -170.173, 287.742, 0, 0, 0, 0, -28.7104, 720.18, 0, 0, 0, 0, 675.151, 706.378, 0, 0, -1.00584, -31.7845, 670.551, 576.417, 0, 0, 0, 0, 702.753, 545.364, 0, 0, 35.0101, -2.36265, 835.015, 544.214, 0, 0, 0, 0, 864.05, 502.889, 0, 0, -1.5035, -34.7953, 864.917, 253.239, 0, 0, 0, 0, 901.721, 224.486, 0, 0, 0, 0, 1062.73, 225.636, 0, 0, 0, 0, 1062.73, -49.2375, 0, 0, 0, 0, 478.484, -36.5864, 0, 0, 4.02914, 42.9775, 478.484, 60.022, 0, 0, 0, 0, 447.431, 95.6752, 0, 0, 0, 0, 448.189, 95.7503, 0, 0, 0, 0, -230.644, 97.8383 )
}

[node name="TitleScreen" type="Control" index="0"]

anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.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

[node name="TileMap" type="TileMap" parent="." index="0"]

modulate = Color( 0.761719, 0.761719, 0.761719, 1 )
scale = Vector2( 0.5, 0.5 )
mode = 0
tile_set = ExtResource( 1 )
cell_size = Vector2( 128, 128 )
cell_quadrant_size = 16
cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
cell_half_offset = 2
cell_tile_origin = 0
cell_y_sort = false
cell_clip_uv = false
collision_use_kinematic = false
collision_friction = 1.0
collision_bounce = 0.0
collision_layer = 1
collision_mask = 1
occluder_light_mask = 1
format = 1
tile_data = PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 1, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 1, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 65536, 2, 0, 65537, 2, 0, 65538, 12, 0, 65539, 2, 0, 65540, 2, 0, 65541, 2, 0, 65542, 2, 0, 65543, 5, 0, 65544, 2, 0, 65545, 2, 0, 65546, 2, 0, 65547, 2, 0, 65548, 2, 0, 65549, 14, 0, 65550, 0, 0, 65551, 0, 0, 131072, 0, 0, 131073, 0, 0, 131074, 1, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 1, 0, 131086, 0, 0, 131087, 0, 0, 196608, 0, 0, 196609, 0, 0, 196610, 1, 0, 196611, 0, 0, 196612, 0, 0, 196613, 0, 0, 196614, 0, 0, 196615, 0, 0, 196616, 0, 0, 196617, 0, 0, 196618, 0, 0, 196619, 0, 0, 196620, 0, 0, 196621, 3, 0, 196622, 2, 0, 196623, 2, 0, 262144, 2, 0, 262145, 14, 0, 262146, 1, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262152, 0, 0, 262153, 0, 0, 262154, 0, 0, 262155, 0, 0, 262156, 0, 0, 262157, 1, 0, 262158, 0, 0, 262159, 0, 0, 327680, 0, 0, 327681, 15, 0, 327682, 11, 0, 327683, 2, 0, 327684, 2, 0, 327685, 2, 0, 327686, 2, 0, 327687, 2, 0, 327688, 2, 0, 327689, 2, 0, 327690, 2, 0, 327691, 2, 0, 327692, 2, 0, 327693, 4, 0, 327694, 0, 0, 327695, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 1, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 0, 0, 393223, 0, 0, 393224, 0, 0, 393225, 0, 0, 393226, 0, 0, 393227, 0, 0, 393228, 0, 0, 393229, 1, 0, 393230, 0, 0, 393231, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 1, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 458765, 1, 0, 458766, 0, 0, 458767, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 1, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 13, 0, 524299, 2, 0, 524300, 2, 0, 524301, 16, 0, 524302, 0, 0, 524303, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 1, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 1, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0 )
_sections_unfolded = [ "Cell", "Transform", "Visibility" ]

[node name="Title" type="Label" parent="." index="1"]

anchor_left = 0.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
margin_top = -134.0
margin_bottom = -18.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_shadow = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 3
custom_constants/shadow_offset_y = 3
text = "Tank Battle"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Rect", "custom_fonts" ]

[node name="PlayMessage" type="Label" parent="." index="2"]

anchor_left = 0.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = -178.0
margin_bottom = -120.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( 2 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_x = 3
custom_constants/shadow_offset_y = 3
text = "Press Space to Play"
align = 1
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Visibility", "custom_fonts" ]

[node name="AnimationPlayer" type="AnimationPlayer" parent="." index="3"]

root_node = NodePath("..")
autoplay = "start"
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/start = SubResource( 3 )
blend_times = [ ]

[node name="Path2D" type="Path2D" parent="." index="4"]

self_modulate = Color( 0.5, 0.6, 1, 0.7 )
curve = SubResource( 4 )

[node name="PathFollow2D" type="PathFollow2D" parent="Path2D" index="0"]

position = Vector2( -228.529, 98.8956 )
rotation = -0.00303456
scale = Vector2( 0.5, 0.5 )
offset = 0.0
h_offset = 0.0
v_offset = 0.0
rotate = true
cubic_interp = true
loop = true
lookahead = 4.0
_sections_unfolded = [ "Transform" ]

[node name="EnemyTank" parent="Path2D/PathFollow2D" index="0" instance=ExtResource( 3 )]

_sections_unfolded = [ "Collision", "Transform", "collision" ]
max_speed = 75

[node name="Obstacle" parent="." index="5" instance=ExtResource( 4 )]

position = Vector2( 156.482, 507.511 )
rotation = -0.967426

[node name="Obstacle2" parent="." index="6" instance=ExtResource( 4 )]

position = Vector2( 932.551, 414.467 )
rotation = -3.6118
type = 19

[node name="Obstacle7" parent="." index="7" instance=ExtResource( 4 )]

position = Vector2( 435.613, 593.153 )
rotation = -3.6118
type = 19

[node name="Obstacle6" parent="." index="8" instance=ExtResource( 4 )]

position = Vector2( 549.803, 559.319 )
rotation = -2.7194
type = 18

[node name="Obstacle5" parent="." index="9" instance=ExtResource( 4 )]

position = Vector2( 1001.28, 383.805 )
rotation = -3.6118
type = 19

[node name="Obstacle4" parent="." index="10" instance=ExtResource( 4 )]

position = Vector2( 939.952, 329.882 )
rotation = -2.80657
type = 19

[node name="Obstacle3" parent="." index="11" instance=ExtResource( 4 )]

position = Vector2( 949.468, 107.846 )
rotation = -2.80657
type = 9

[node name="Obstacle8" parent="." index="12" instance=ExtResource( 4 )]

position = Vector2( 79.9405, 190.386 )
rotation = -1.56665
type = 6

[node name="Obstacle9" parent="." index="13" instance=ExtResource( 4 )]

position = Vector2( 29.6049, 163.884 )
rotation = -1.84714
type = 7

[node name="Obstacle10" parent="." index="14" instance=ExtResource( 4 )]

position = Vector2( 29.0277, 213.416 )
rotation = -1.84714
type = 7


0 comments on commit 2b549c2

Please sign in to comment.