-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Diamond-Dan/Sprite_Gen_Branch
Merge for main program core functionality
- Loading branch information
Showing
407 changed files
with
3,905 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Godot 4+ specific ignores | ||
.godot/ | ||
python/*.png | ||
python/*.png.import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://bghqa1ia3wk5n"] | ||
|
||
[ext_resource type="Theme" uid="uid://c0l6lyvo8lxkx" path="res://text.tres" id="1_jshss"] | ||
[ext_resource type="Script" path="res://Moutains_Button.gd" id="2_g5juy"] | ||
|
||
[node name="Node2D" type="Node2D"] | ||
|
||
[node name="RichTextLabel" type="RichTextLabel" parent="."] | ||
offset_left = 449.0 | ||
offset_top = 73.0 | ||
offset_right = 749.0 | ||
offset_bottom = 131.32 | ||
theme = ExtResource("1_jshss") | ||
theme_override_font_sizes/normal_font_size = 41 | ||
text = "Options" | ||
|
||
[node name="Moutains_Button" type="Button" parent="."] | ||
offset_left = 450.0 | ||
offset_top = 176.0 | ||
offset_right = 594.0 | ||
offset_bottom = 207.0 | ||
text = "Normal Moutains" | ||
script = ExtResource("2_g5juy") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
extends RigidBody2D | ||
var mob_types | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
mob_types = $AnimatedSprite2D.sprite_frames.get_animation_names() | ||
var skin=randi_range(0,1) | ||
|
||
$AnimatedSprite2D.play(mob_types[skin]) | ||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(delta): | ||
pass | ||
|
||
func _on_visible_on_screen_notifier_2d_screen_exited(): | ||
queue_free() | ||
|
||
|
||
func _on_body_shape_entered(body_rid, body, body_shape_index, local_shape_index): | ||
#if(get_colliding_bodies()!=[]): | ||
#print(get_colliding_bodies()) | ||
$AnimatedSprite2D.play(mob_types[2]) | ||
|
||
$despawn_timer.start() | ||
$collision_timer.start() | ||
|
||
|
||
|
||
|
||
func _on_timer_timeout(): | ||
queue_free() # Replace with function body. | ||
|
||
|
||
func _on_collision_timer_timeout(): | ||
$CollisionShape2D.disabled=true | ||
set_collision_layer_value(1,false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[gd_scene load_steps=5 format=3 uid="uid://m4mldp66rc6m"] | ||
|
||
[ext_resource type="Script" path="res://Start_Button.gd" id="1_ucgwb"] | ||
[ext_resource type="Script" path="res://Tutorial_Button.gd" id="2_hrosy"] | ||
[ext_resource type="Script" path="res://Options_button.gd" id="3_4760c"] | ||
[ext_resource type="Script" path="res://RichTextLabel.gd" id="4_ah3rv"] | ||
|
||
[node name="Node2D" type="Node2D"] | ||
|
||
[node name="Start_Button" type="Button" parent="."] | ||
offset_left = 510.0 | ||
offset_top = 266.0 | ||
offset_right = 518.0 | ||
offset_bottom = 274.0 | ||
scale = Vector2(1.76923, 2.63158) | ||
text = "Start Game" | ||
script = ExtResource("1_ucgwb") | ||
|
||
[node name="Tutorial_Button" type="Button" parent="."] | ||
custom_minimum_size = Vector2(120, 80) | ||
offset_left = 533.0 | ||
offset_top = 372.0 | ||
offset_right = 653.0 | ||
offset_bottom = 452.0 | ||
text = "Tutorial" | ||
script = ExtResource("2_hrosy") | ||
|
||
[node name="Options_button" type="Button" parent="."] | ||
offset_left = 1037.0 | ||
offset_top = 29.0 | ||
offset_right = 1111.0 | ||
offset_bottom = 60.0 | ||
text = "Options " | ||
script = ExtResource("3_4760c") | ||
|
||
[node name="Name" type="RichTextLabel" parent="."] | ||
custom_minimum_size = Vector2(404, 152) | ||
anchors_preset = 5 | ||
anchor_left = 0.5 | ||
anchor_right = 0.5 | ||
offset_left = 403.0 | ||
offset_top = 120.0 | ||
offset_right = 807.0 | ||
offset_bottom = 272.0 | ||
grow_horizontal = 2 | ||
theme_override_font_sizes/normal_font_size = 53 | ||
theme_override_font_sizes/bold_font_size = 1 | ||
text = "Micro Defender" | ||
|
||
[node name="RichTextLabel" type="RichTextLabel" parent="."] | ||
offset_left = 494.0 | ||
offset_top = 460.0 | ||
offset_right = 694.0 | ||
offset_bottom = 510.0 | ||
text = "Last High Score:" | ||
script = ExtResource("4_ah3rv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://m4mldp66rc6m"] | ||
|
||
[ext_resource type="Script" path="res://Start_Button.gd" id="1_ucgwb"] | ||
[ext_resource type="Script" path="res://Tutorial_Button.gd" id="2_hrosy"] | ||
|
||
[node name="Node2D" type="Node2D"] | ||
|
||
[node name="Start_Button" type="Button" parent="."] | ||
offset_left = 510.0 | ||
offset_top = 266.0 | ||
offset_right = 518.0 | ||
offset_bottom = 274.0 | ||
scale = Vector2(1.76923, 2.63158) | ||
text = "Start Game" | ||
script = ExtResource("1_ucgwb") | ||
|
||
[node name="Tutorial_Button" type="Button" parent="."] | ||
custom_minimum_size = Vector2(120, 80) | ||
offset_left = 533.0 | ||
offset_top = 372.0 | ||
offset_right = 653.0 | ||
offset_bottom = 452.0 | ||
text = "Tutorial" | ||
script = ExtResource("2_hrosy") | ||
|
||
[node name="Options_button" type="Button" parent="."] | ||
offset_left = 1037.0 | ||
offset_top = 29.0 | ||
offset_right = 1111.0 | ||
offset_bottom = 60.0 | ||
text = "Options " | ||
|
||
[node name="Name" type="RichTextLabel" parent="."] | ||
custom_minimum_size = Vector2(404, 152) | ||
anchors_preset = 5 | ||
anchor_left = 0.5 | ||
anchor_right = 0.5 | ||
offset_left = 403.0 | ||
offset_top = 120.0 | ||
offset_right = 807.0 | ||
offset_bottom = 272.0 | ||
grow_horizontal = 2 | ||
theme_override_font_sizes/normal_font_size = 53 | ||
theme_override_font_sizes/bold_font_size = 1 | ||
text = "Micro Defender" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://m4mldp66rc6m"] | ||
|
||
[ext_resource type="Script" path="res://Start_Button.gd" id="1_ucgwb"] | ||
[ext_resource type="Script" path="res://Tutorial_Button.gd" id="2_hrosy"] | ||
|
||
[node name="Node2D" type="Node2D"] | ||
|
||
[node name="Start_Button" type="Button" parent="."] | ||
offset_left = 510.0 | ||
offset_top = 266.0 | ||
offset_right = 518.0 | ||
offset_bottom = 274.0 | ||
scale = Vector2(1.76923, 2.63158) | ||
text = "Start Game" | ||
script = ExtResource("1_ucgwb") | ||
|
||
[node name="Tutorial_Button" type="Button" parent="."] | ||
custom_minimum_size = Vector2(120, 80) | ||
offset_left = 533.0 | ||
offset_top = 372.0 | ||
offset_right = 653.0 | ||
offset_bottom = 452.0 | ||
text = "Tutorial" | ||
script = ExtResource("2_hrosy") | ||
|
||
[node name="Options_button" type="Button" parent="."] | ||
offset_left = 1037.0 | ||
offset_top = 29.0 | ||
offset_right = 1111.0 | ||
offset_bottom = 60.0 | ||
text = "Options " | ||
|
||
[node name="Name" type="RichTextLabel" parent="."] | ||
custom_minimum_size = Vector2(404, 152) | ||
anchors_preset = 5 | ||
anchor_left = 0.5 | ||
anchor_right = 0.5 | ||
offset_left = 403.0 | ||
offset_top = 120.0 | ||
offset_right = 807.0 | ||
offset_bottom = 272.0 | ||
grow_horizontal = 2 | ||
theme_override_font_sizes/normal_font_size = 53 | ||
theme_override_font_sizes/bold_font_size = 1 | ||
text = "Micro Defender" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
extends MenuBar | ||
|
||
|
||
var pause=false | ||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
process_mode = Node.PROCESS_MODE_ALWAYS | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(delta): | ||
pass | ||
|
||
func _input(event): | ||
if event.is_action_pressed("Pause") and pause!=true: | ||
get_tree().paused=true | ||
pause=true | ||
$quit_but.show() | ||
elif event.is_action_pressed("Pause") and pause==true: | ||
get_tree().paused=false | ||
pause=false | ||
$quit_but.hide() | ||
|
||
|
||
func _on_quit_but_pressed(): | ||
get_tree().paused=false | ||
get_tree().change_scene_to_file("res://intro.tscn") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
extends MenuButton | ||
|
||
var pause=false | ||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
process_mode = Node.PROCESS_MODE_PAUSABLE | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(delta): | ||
pass | ||
|
||
func _input(event): | ||
if event.is_action_pressed("Pause") and pause!=true: | ||
get_tree().paused=true | ||
pause=true | ||
show() | ||
else: | ||
get_tree().paused=false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
extends Button | ||
|
||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
if Difficulty.num_of_mountains==50: | ||
|
||
self.text="Normal Mountains" | ||
elif Difficulty.num_of_mountains==80: | ||
|
||
self.text="More Mountains" | ||
elif Difficulty.num_of_mountains==100: | ||
|
||
self.text="Even MORE Mountains" | ||
elif Difficulty.num_of_mountains==300: | ||
|
||
self.text="MOSTLY MOUNTAINS EXTREME CAUTION IS ADVISED" | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(delta): | ||
pass | ||
|
||
func _pressed(): | ||
if Difficulty.num_of_mountains==50: | ||
Difficulty.num_of_mountains=80 | ||
self.text="More Mountains" | ||
elif Difficulty.num_of_mountains==80: | ||
Difficulty.num_of_mountains=100 | ||
self.text="Even MORE Mountains" | ||
elif Difficulty.num_of_mountains==100: | ||
Difficulty.num_of_mountains=300 | ||
self.text="MOSTLY MOUNTAINS EXTREME CAUTION IS ADVISED" | ||
elif Difficulty.num_of_mountains==300: | ||
Difficulty.num_of_mountains=50 | ||
self.text="Normal Mountains" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://wpi0vp3c1vkn"] | ||
|
||
[ext_resource type="Theme" uid="uid://c0l6lyvo8lxkx" path="res://text.tres" id="1_oyygy"] | ||
[ext_resource type="Script" path="res://Moutains_Button.gd" id="2_jutn7"] | ||
[ext_resource type="Script" path="res://return_button.gd" id="3_q4pt3"] | ||
|
||
[node name="Node2D" type="Node2D"] | ||
|
||
[node name="Title" type="RichTextLabel" parent="."] | ||
offset_left = 436.0 | ||
offset_top = 23.0 | ||
offset_right = 736.0 | ||
offset_bottom = 81.32 | ||
theme = ExtResource("1_oyygy") | ||
theme_override_font_sizes/normal_font_size = 41 | ||
text = "Options" | ||
|
||
[node name="Option 1 title" type="RichTextLabel" parent="."] | ||
offset_left = 163.0 | ||
offset_top = 81.0 | ||
offset_right = 963.0 | ||
offset_bottom = 181.0 | ||
theme = ExtResource("1_oyygy") | ||
theme_override_font_sizes/normal_font_size = 31 | ||
text = "Press the button below to adjust the number of mountains you encounter. This will increase the difficulty" | ||
|
||
[node name="Moutains_Button" type="Button" parent="."] | ||
custom_minimum_size = Vector2(300, 100) | ||
offset_left = 385.0 | ||
offset_top = 178.0 | ||
offset_right = 685.0 | ||
offset_bottom = 278.0 | ||
text = "Normal Moutains" | ||
script = ExtResource("2_jutn7") | ||
|
||
[node name="return_button" type="Button" parent="."] | ||
offset_left = 457.0 | ||
offset_top = 299.0 | ||
offset_right = 615.0 | ||
offset_bottom = 330.0 | ||
text = "Back to main menu" | ||
script = ExtResource("3_q4pt3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
extends Button | ||
|
||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
pass # Replace with function body. | ||
|
||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(delta): | ||
pass | ||
|
||
func _pressed(): | ||
get_tree().change_scene_to_file("res://Options.tscn") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.