Browse Source
Added a main menu which is where the game starts and goes too once the rocket hits an asteroid. Very basic for now.master
Abheek Dhawan
4 years ago
5 changed files with 81 additions and 2 deletions
@ -0,0 +1,58 @@ |
|||
[gd_scene load_steps=4 format=2] |
|||
|
|||
[ext_resource path="res://Scripts/Text Container.gd" type="Script" id=1] |
|||
[ext_resource path="res://Objects/Rocket.tscn" type="PackedScene" id=2] |
|||
[ext_resource path="res://Images and Anims/In Game/background.png" type="Texture" id=3] |
|||
|
|||
[node name="MarginContainer" type="MarginContainer"] |
|||
anchor_right = 1.0 |
|||
anchor_bottom = 1.0 |
|||
custom_constants/margin_right = 120 |
|||
custom_constants/margin_top = 80 |
|||
custom_constants/margin_left = 120 |
|||
custom_constants/margin_bottom = 80 |
|||
__meta__ = { |
|||
"_edit_use_anchors_": false |
|||
} |
|||
|
|||
[node name="Rocket" parent="." instance=ExtResource( 2 )] |
|||
position = Vector2( 416, 760 ) |
|||
scale = Vector2( 15, 15 ) |
|||
|
|||
[node name="Text Container" type="Node2D" parent="."] |
|||
position = Vector2( 414, 896 ) |
|||
script = ExtResource( 1 ) |
|||
|
|||
[node name="AsteroidDodge" type="Label" parent="Text Container"] |
|||
margin_left = -321.63 |
|||
margin_top = -826.827 |
|||
margin_right = -257.63 |
|||
margin_bottom = -778.827 |
|||
rect_scale = Vector2( 10, 10 ) |
|||
text = "ASTEROID |
|||
DODGE |
|||
" |
|||
align = 1 |
|||
valign = 1 |
|||
__meta__ = { |
|||
"_edit_use_anchors_": false |
|||
} |
|||
|
|||
[node name="Tap" type="Label" parent="Text Container"] |
|||
margin_left = -264.901 |
|||
margin_top = 682.457 |
|||
margin_right = -191.901 |
|||
margin_bottom = 696.457 |
|||
rect_scale = Vector2( 7, 7 ) |
|||
text = "Tap to play!" |
|||
align = 1 |
|||
valign = 1 |
|||
__meta__ = { |
|||
"_edit_use_anchors_": false |
|||
} |
|||
|
|||
[node name="Sprite" type="Sprite" parent="."] |
|||
position = Vector2( 344.221, 738.579 ) |
|||
scale = Vector2( 4.19527, 4.19527 ) |
|||
z_index = -1 |
|||
texture = ExtResource( 3 ) |
@ -0,0 +1,9 @@ |
|||
extends Node2D |
|||
|
|||
var time = 0 |
|||
|
|||
func _process(delta): |
|||
time += delta |
|||
rotation = sin(time)/10 |
|||
if Input.is_mouse_button_pressed(BUTTON_LEFT): |
|||
get_tree().change_scene("res://Game Scenes/Game.tscn") |
Loading…
Reference in new issue