mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 11:59:58 -05:00
replace winamp with somethign awesome like honey simulator 2028
This commit is contained in:
12
Scripts/AudioStreamPlayer2.gd
Normal file
12
Scripts/AudioStreamPlayer2.gd
Normal file
@ -0,0 +1,12 @@
|
||||
extends AudioStreamPlayer3D
|
||||
|
||||
|
||||
# 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):
|
||||
if Input.is_action_just_pressed("hyperspeed"):
|
||||
play()
|
13
Scripts/Autoload.gd
Normal file
13
Scripts/Autoload.gd
Normal file
@ -0,0 +1,13 @@
|
||||
extends Node
|
||||
|
||||
var highscorefps : bool = false
|
||||
var highscorefps_highscore : int = 0
|
||||
var highscorefps_lost : bool = false
|
||||
|
||||
var highscorecatexplotano : bool = false
|
||||
var highscorecatexplotano_highscore : int = 0
|
||||
var highscorecatexplotano_lost : bool = false
|
||||
|
||||
func _process(delta):
|
||||
#print(get_tree().current_scene.name)
|
||||
pass
|
12
Scripts/Camera.gd
Normal file
12
Scripts/Camera.gd
Normal file
@ -0,0 +1,12 @@
|
||||
extends Camera3D
|
||||
|
||||
|
||||
# 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
|
||||
|
21
Scripts/CameraSpin.gd
Normal file
21
Scripts/CameraSpin.gd
Normal file
@ -0,0 +1,21 @@
|
||||
extends Node3D
|
||||
|
||||
var cameraRotation : bool = true
|
||||
|
||||
func _process(delta):
|
||||
if cameraRotation == true:
|
||||
rotation.y += 1.0*delta
|
||||
else:
|
||||
if Input.is_action_pressed("cameraLeft"):
|
||||
rotation.y -= 1.0*delta
|
||||
if Input.is_action_pressed("cameraRight"):
|
||||
rotation.y += 1.0*delta
|
||||
if Input.is_action_pressed("cameraUp"):
|
||||
rotation.x -= 1.0*delta
|
||||
if Input.is_action_pressed("cameraDown"):
|
||||
rotation.x += 1.0*delta
|
||||
if Input.is_action_just_pressed("camera"):
|
||||
cameraRotation = !cameraRotation
|
||||
if Input.is_action_just_pressed("reset"):
|
||||
rotation.y = 0
|
||||
rotation.x = 0
|
36
Scripts/HighScoreSpawner.gd
Normal file
36
Scripts/HighScoreSpawner.gd
Normal file
@ -0,0 +1,36 @@
|
||||
extends Node
|
||||
|
||||
@export var sugarcoat : Sprite3D
|
||||
@export var boom : AudioStreamPlayer3D
|
||||
|
||||
var timer : int = 0
|
||||
var honey = preload("res://Scenes/honey_the_cat.tscn")
|
||||
var honey_instance = honey.instantiate()
|
||||
var rng = RandomNumberGenerator.new()
|
||||
var honey_count : int = 0
|
||||
var timer_stop = 3
|
||||
|
||||
func _ready():
|
||||
#Autoload.highscore = true
|
||||
pass
|
||||
|
||||
func _physics_process(delta):
|
||||
if Engine.get_frames_per_second() <= 5 && honey_count > 30:
|
||||
Autoload.highscorefps_highscore = honey_count
|
||||
Autoload.highscorefps_lost = true
|
||||
if timer >= timer_stop && Autoload.highscorefps_lost == false:
|
||||
honey_instance = honey.instantiate()
|
||||
add_child(honey_instance)
|
||||
honey_instance.position.y = 16
|
||||
honey_instance.position.x = rng.randf_range(-20, 20)
|
||||
honey_instance.position.z = rng.randf_range(-20, 20)
|
||||
honey_instance.rotation.x = rng.randf_range(-0.2, 0.2)
|
||||
honey_instance.rotation.z = rng.randf_range(-0.2, 0.2)
|
||||
honey_count += 1
|
||||
sugarcoat.val = 1.0
|
||||
boom.play()
|
||||
print("Printed cat at ", honey_instance.position, "...")
|
||||
timer = 0
|
||||
else:
|
||||
timer += 1
|
||||
|
17
Scripts/HighscoreCatExplotanoLabel3D.gd
Normal file
17
Scripts/HighscoreCatExplotanoLabel3D.gd
Normal file
@ -0,0 +1,17 @@
|
||||
extends Label3D
|
||||
|
||||
@export var spawner : Node
|
||||
|
||||
var textEnabled : bool = true
|
||||
|
||||
# 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):
|
||||
if Autoload.highscorecatexplotano_lost == false:
|
||||
text = "Honeys Spawned: " + str(spawner.honey_count) + "\nScore: " + str(spawner.honey_score)
|
||||
else:
|
||||
text = "You lost!\nScore: " + str(spawner.honey_score)
|
33
Scripts/HighscoreCatExplotanoSpawner.gd
Normal file
33
Scripts/HighscoreCatExplotanoSpawner.gd
Normal file
@ -0,0 +1,33 @@
|
||||
extends Node
|
||||
|
||||
var timer : int = 0
|
||||
var honey = preload("res://Scenes/honey_the_cat.tscn")
|
||||
var honey_instance = honey.instantiate()
|
||||
var rng = RandomNumberGenerator.new()
|
||||
var honey_count : int = 0
|
||||
var timer_stop : int = 60
|
||||
var timer_accel : int = 0
|
||||
var honey_score : int = 0
|
||||
|
||||
func _physics_process(delta):
|
||||
if honey_count >= 500:
|
||||
Autoload.highscorecatexplotano_lost = true
|
||||
if timer >= timer_stop && Autoload.highscorecatexplotano_lost == false:
|
||||
honey_instance = honey.instantiate()
|
||||
add_child(honey_instance)
|
||||
honey_instance.position.y = 16
|
||||
honey_instance.position.x = rng.randf_range(-20, 20)
|
||||
honey_instance.position.z = rng.randf_range(-20, 20)
|
||||
honey_instance.rotation.x = rng.randf_range(-0.2, 0.2)
|
||||
honey_instance.rotation.z = rng.randf_range(-0.2, 0.2)
|
||||
honey_count += 1
|
||||
print("Printed cat at ", honey_instance.position, "...")
|
||||
timer = 0
|
||||
else:
|
||||
timer += 1
|
||||
|
||||
if timer_accel >= 120 && timer_stop > 1:
|
||||
timer_stop -= 1
|
||||
timer_accel = 0
|
||||
else:
|
||||
timer_accel += 1
|
20
Scripts/Label3D.gd
Normal file
20
Scripts/Label3D.gd
Normal file
@ -0,0 +1,20 @@
|
||||
extends Label3D
|
||||
|
||||
|
||||
@export var spawner : Node
|
||||
|
||||
var textEnabled : bool = true
|
||||
|
||||
# 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):
|
||||
if Input.is_action_just_pressed("text"):
|
||||
textEnabled = !textEnabled
|
||||
if textEnabled == true:
|
||||
text = "Honeys Spawned: " + str(spawner.honey_count) + "\nFPS: " + str(Engine.get_frames_per_second()) + "\nHold Space for HYPERSPEED\nPress C to toggle camera rotation\nPress R to reset camera\nArrow keys for manual camera\nPress F to disable UI"
|
||||
else:
|
||||
text = ""
|
16
Scripts/MeshInstance3D.gd
Normal file
16
Scripts/MeshInstance3D.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends MeshInstance3D
|
||||
|
||||
var material = StandardMaterial3D.new()
|
||||
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
material.albedo_color = Color(255, 255, 255)
|
||||
set_surface_override_material(0, material)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
38
Scripts/Spawner.gd
Normal file
38
Scripts/Spawner.gd
Normal file
@ -0,0 +1,38 @@
|
||||
extends Node
|
||||
|
||||
var timer : int = 0
|
||||
var honey = preload("res://Scenes/honey_the_cat.tscn")
|
||||
var honey_instance = honey.instantiate()
|
||||
var rng = RandomNumberGenerator.new()
|
||||
var honey_count : int = 0
|
||||
var timer_stop = 24
|
||||
var honey_score : int = 0
|
||||
|
||||
func _physics_process(delta):
|
||||
if Input.is_action_just_pressed("hyperspeed"):
|
||||
honey_instance = honey.instantiate()
|
||||
add_child(honey_instance)
|
||||
honey_instance.position.y = 16
|
||||
honey_instance.position.x = rng.randf_range(-20, 20)
|
||||
honey_instance.position.z = rng.randf_range(-20, 20)
|
||||
honey_instance.rotation.x = rng.randf_range(-0.2, 0.2)
|
||||
honey_instance.rotation.z = rng.randf_range(-0.2, 0.2)
|
||||
honey_count += 1
|
||||
if Input.is_action_pressed("hyperspeed"):
|
||||
timer_stop = 6
|
||||
else:
|
||||
timer_stop = 24
|
||||
if timer >= timer_stop:
|
||||
honey_instance = honey.instantiate()
|
||||
add_child(honey_instance)
|
||||
honey_instance.position.y = 16
|
||||
honey_instance.position.x = rng.randf_range(-20, 20)
|
||||
honey_instance.position.z = rng.randf_range(-20, 20)
|
||||
honey_instance.rotation.x = rng.randf_range(-0.2, 0.2)
|
||||
honey_instance.rotation.z = rng.randf_range(-0.2, 0.2)
|
||||
honey_count += 1
|
||||
print("Printed cat at ", honey_instance.position, "...")
|
||||
timer = 0
|
||||
else:
|
||||
timer += 1
|
||||
|
18
Scripts/Sprite3D.gd
Normal file
18
Scripts/Sprite3D.gd
Normal file
@ -0,0 +1,18 @@
|
||||
extends Sprite3D
|
||||
|
||||
|
||||
var val : float = 0.0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
modulate.a = val
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _physics_process(delta):
|
||||
if Input.is_action_just_pressed("hyperspeed"):
|
||||
val = 1.0
|
||||
modulate.a = val
|
||||
if val > 0.1:
|
||||
val -= 0.1
|
14
Scripts/TitleScreenLabel.gd
Normal file
14
Scripts/TitleScreenLabel.gd
Normal file
@ -0,0 +1,14 @@
|
||||
extends Label
|
||||
|
||||
@export var title_screen : Node2D
|
||||
|
||||
# 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):
|
||||
if title_screen.loaded == true:
|
||||
visible = false
|
||||
pass
|
17
Scripts/highscoreLabel3D.gd
Normal file
17
Scripts/highscoreLabel3D.gd
Normal file
@ -0,0 +1,17 @@
|
||||
extends Label3D
|
||||
|
||||
@export var spawner : Node
|
||||
|
||||
var textEnabled : bool = true
|
||||
|
||||
# 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):
|
||||
if Autoload.highscorefps_lost == true:
|
||||
text = "You lost!\nYour final score was: " + str(spawner.honey_count)
|
||||
else:
|
||||
text = "Score: " + str(spawner.honey_count) + "\nFPS: " + str(Engine.get_frames_per_second())
|
56
Scripts/honey_the_cat.gd
Normal file
56
Scripts/honey_the_cat.gd
Normal file
@ -0,0 +1,56 @@
|
||||
extends RigidBody3D
|
||||
|
||||
@export var catexplotano : AnimatedSprite3D
|
||||
@export var catexplotano_sound : AudioStreamPlayer3D
|
||||
@export var gato : Node3D
|
||||
var explotanowait : int = 0
|
||||
var entered : bool = false
|
||||
var rng = RandomNumberGenerator.new()
|
||||
var explotanod : bool = false
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
|
||||
input_ray_pickable = true
|
||||
catexplotano.visible = false
|
||||
explotanowait = rng.randi_range(1, 900)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if Input.is_action_pressed("explode") && entered == true && Autoload.highscorefps == false:
|
||||
print("cat explotano")
|
||||
explotanod = true
|
||||
catexplotano.visible = true
|
||||
catexplotano.play()
|
||||
if !catexplotano_sound.playing:
|
||||
catexplotano_sound.play()
|
||||
get_node("/root/HoneySim2028/Spawner").honey_count -= 1
|
||||
if Autoload.highscorecatexplotano == true:
|
||||
get_node("/root/HoneySim2028/Spawner").honey_score += 1
|
||||
|
||||
func _physics_process(delta):
|
||||
if explotanod:
|
||||
for i in gato.get_children():
|
||||
i.transparency += 0.05
|
||||
if Autoload.highscorefps_lost == true || Autoload.highscorecatexplotano_lost == true:
|
||||
if explotanowait <= 0:
|
||||
print("cat explotano")
|
||||
explotanod = true
|
||||
catexplotano.visible = true
|
||||
catexplotano.play()
|
||||
if !catexplotano_sound.playing:
|
||||
catexplotano_sound.play()
|
||||
else:
|
||||
explotanowait -= 1
|
||||
|
||||
func _mouse_enter():
|
||||
entered = true
|
||||
|
||||
func _mouse_exit():
|
||||
entered = false
|
||||
|
||||
|
||||
func _on_audio_stream_player_3d_finished():
|
||||
queue_free() # Replace with function body.
|
36
Scripts/titlescreen.gd
Normal file
36
Scripts/titlescreen.gd
Normal file
@ -0,0 +1,36 @@
|
||||
extends Node2D
|
||||
|
||||
var honeysim2028 = preload("res://Scenes/honeysimulator.tscn").instantiate()
|
||||
var highscorefps = preload("res://Scenes/highscorefps.tscn").instantiate()
|
||||
var highscorecatexplotano = preload("res://Scenes/highscorecatexplotano.tscn").instantiate()
|
||||
var loaded : bool = false
|
||||
|
||||
@export var honeysong3 : AudioStreamPlayer
|
||||
@export var honeysongjpg : Sprite2D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
honeysong3.play()
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("esc"):
|
||||
print("lol I couldn't figure this one out actually")
|
||||
|
||||
if loaded == true:
|
||||
honeysongjpg.visible = false
|
||||
honeysong3.stop()
|
||||
return
|
||||
elif Input.is_action_just_pressed("1"):
|
||||
loaded = true
|
||||
get_tree().root.add_child(honeysim2028)
|
||||
elif Input.is_action_just_pressed("2"):
|
||||
loaded = true
|
||||
Autoload.highscorefps = true
|
||||
get_tree().root.add_child(highscorefps)
|
||||
elif Input.is_action_just_pressed("3"):
|
||||
loaded = true
|
||||
Autoload.highscorecatexplotano = true
|
||||
get_tree().root.add_child(highscorecatexplotano)
|
Reference in New Issue
Block a user