Compare commits

..

No commits in common. "9e8fbafaa83c75012e24b98579a393a91dcae601" and "af4f5062b78146898cdad94f7e4657d7b4a12d09" have entirely different histories.

22 changed files with 54 additions and 398 deletions

View File

@ -13,4 +13,4 @@ func _process(_delta):
func _on_body_entered(body):
if body in get_tree().get_nodes_in_group('player'):
CheckPoint.add_checkpoint(name, body.global_position, Music.m_current)
CheckPoint.add_checkpoint(name, body.global_position)

View File

@ -4,39 +4,31 @@ class CheckPointData:
var checkpoint_name
var player_position
var strikes: bool = false
var strikes_freq = 5.0
var alarm = false
var music = ''
func _init(myname, ppos, mymusic):
func _init(myname, ppos):
checkpoint_name = myname
player_position = ppos
music = mymusic
var m_checkpoints = []
func _ready():
pass
func _process(_delta):
func _process(delta):
pass
func reset():
m_checkpoints.clear()
func add_checkpoint(myname, pos, music):
func add_checkpoint(name, pos):
for cp in m_checkpoints:
if cp.checkpoint_name == myname:
if cp.checkpoint_name == name:
return
var strikes = false
var alarm = false
if m_checkpoints.is_empty() == false:
strikes = m_checkpoints.back().strikes
alarm = m_checkpoints.back().alarm
m_checkpoints.push_back(CheckPointData.new(myname, pos, music))
m_checkpoints.push_back(CheckPointData.new(name, pos))
m_checkpoints.back().strikes = strikes
m_checkpoints.back().alarm = alarm
func has_checkpoint():
return m_checkpoints.is_empty() == false

View File

@ -1,20 +0,0 @@
extends CanvasLayer
var m_freq = 2
var m_phase = 0.0
var m_alarm_on = false
func _ready():
$ColorRect.visible = false
func _process(delta):
if m_alarm_on:
$ColorRect.visible = true
var t = sin(2 * PI * m_phase)
m_phase += m_freq * delta
$ColorRect.color = Color(1.0, 0.2, 0.2, (1.0 - t) * 0.0 + t * 0.1)
if t >= 0.95:
Music.play_sfx('piew')
else:
$ColorRect.visible = false

View File

@ -6,41 +6,24 @@ func _ready():
var cp = CheckPoint.get_checkpoint()
$Sandbox/Player/Actor.global_position = cp.player_position
$Sandbox.strike_enabled = cp.strikes
$Sandbox/CanvasAlarm.m_alarm_on = cp.alarm
if cp.music != '':
Music.play(cp.music)
else:
var msg = preload("res://MsgBox/msg_box.tscn").instantiate()
$Sandbox/Canvas.add_child(msg)
msg.enable('Hello prisoner', '
Hello prisoner,
Our spaceship is under attack, but don\'t worry,
you will be executed at time, as soon as we escape.
Good luck ! Muhahahahaha
Good luck !
')
func _start():
pass
func _process(_delta):
$CanvasTime/Label.text = str(round($EndTimer.time_left))
func _process(delta):
pass
func _on_area_2d_body_entered(_body):
func _on_area_2d_body_entered(body):
$Sandbox.strike_enabled = true
$Sandbox.m_strike_freq = 5.0
$Sandbox/CanvasAlarm.m_alarm_on = true
if CheckPoint.has_checkpoint():
CheckPoint.get_checkpoint().strikes = true
CheckPoint.get_checkpoint().alarm = true
func _on_area_2d_more_body_entered(_body):
$Sandbox.strike_enabled = true
$Sandbox.m_strike_freq = 1.0
$CanvasTime.visible = true
$EndTimer.start()
if CheckPoint.has_checkpoint():
CheckPoint.get_checkpoint().strikes = true
CheckPoint.get_checkpoint().alarm = true

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,13 @@
extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
pass
pass # Replace with function body.
func _process(_delta):
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_button_pressed():

View File

@ -2,7 +2,7 @@ extends Control
func _ready():
Music.play('novox')
pass # Replace with function body.
func _process(_delta):

View File

@ -8,7 +8,7 @@ var m_bodies = []
func _ready():
pass
func _process(_delta):
func _process(delta):
pass
func _on_body_entered(body):

View File

@ -15,7 +15,7 @@ var m_pages = []
func _ready():
pass
func _process(_delta):
func _process(delta):
if Input.is_action_just_pressed("ui_accept"):
self._on_button_pressed()

Binary file not shown.

Binary file not shown.

View File

@ -1,58 +0,0 @@
extends Node
var m_music = null
var m_player : AudioStreamPlayer = null
var m_current = ''
var m_stop_timer = 0.0
var m_stop_time = 0.5
var m_stop = false
var m_next = null
var m_sfx_player : AudioStreamPlayer = null
var m_titles = [
'fight_or_die'
]
func _ready():
m_player = AudioStreamPlayer.new()
m_sfx_player = AudioStreamPlayer.new()
m_player.process_mode = Node.PROCESS_MODE_ALWAYS
add_child(m_player)
add_child(m_sfx_player)
func _process(delta):
if m_stop:
var t = m_stop_timer / m_stop_time
m_player.volume_db = t * -16.0
if m_stop_timer >= m_stop_time:
m_stop = false
m_stop_timer = 0.0
if m_next:
play(m_next)
m_stop_timer += delta
func next(music_name):
if m_player.playing and m_current == music_name:
return
if m_player.playing:
m_next = music_name
m_stop = true
else:
play(music_name)
func play(music_name):
m_player.volume_db = -7.0
m_current = music_name
var data = load("res://Music/" + music_name + ".ogg")
data.loop = true
m_player.stream = data
m_player.seek(0)
m_player.play()
func play_sfx(sfx_name):
m_sfx_player.stream = load("res://Music/" + sfx_name + ".wav")
m_sfx_player.play()
m_sfx_player.volume_db = 5

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +0,0 @@
extends Area2D
@export var music : String = Music.m_titles[0]
func _ready():
pass
func _process(_delta):
pass
func _on_body_entered(body):
if body in get_tree().get_nodes_in_group('player'):
Music.next(music)

View File

@ -1,15 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://dw7khu8cvs50n"]
[ext_resource type="Script" path="res://MusicArea/music_area.gd" id="1_60yhl"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_c834i"]
size = Vector2(383, 20)
[node name="MusicArea" type="Area2D"]
script = ExtResource("1_60yhl")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_c834i")
debug_color = Color(0.627451, 0.823529, 0.270588, 0.419608)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -9,7 +9,6 @@ var m_death_time = 1.0
var m_strike_time = 1.0
var m_strike_timer = 0.0
var m_strike_freq = 5.0
var m_strikes = []
func _ready():
@ -47,11 +46,10 @@ func process(delta):
ground = t
break
if ground:
Music.play_sfx('strike')
self.add_broken_ground(ground, 1, 0.8)
$Strikes.add_line(to_global($TileMap.map_to_local(ground)), 0.15)
m_strike_timer = 0.0
m_strike_time = randf() * m_strike_freq
m_strike_time = randf() * 5.0
m_strike_timer += delta
if m_broken_timer >= m_broken_time:
@ -97,7 +95,6 @@ func throw_bomb(from: Vector2, dir: Vector2, dist: float):
add_child(bomb)
func _on_bomb_explode(bomb, _level):
Music.play_sfx("explose")
var tilemap: TileMap = $TileMap
var pos = tilemap.local_to_map(bomb.position)

View File

@ -1,14 +1,14 @@
[preset.0]
name="macOS"
platform="macOS"
name="Linux/X11"
platform="Linux/X11"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../../Export/aze/hello.zip"
export_path="../../Export/hello.x86_64"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
@ -16,88 +16,24 @@ encrypt_directory=false
[preset.0.options]
export/distribution_type=1
binary_format/architecture="universal"
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
application/icon=""
application/icon_interpolation=4
application/bundle_identifier="bog.ld54s"
application/signature=""
application/app_category="Games"
application/short_version="1.0"
application/version=""
application/copyright=""
application/copyright_localized={}
application/min_macos_version="10.12"
display/high_res=true
xcode/platform_build="14C18"
xcode/sdk_version="13.1"
xcode/sdk_build="22C55"
xcode/sdk_name="macosx13.1"
xcode/xcode_version="1420"
xcode/xcode_build="14C18"
codesign/codesign=1
codesign/installer_identity=""
codesign/apple_team_id=""
codesign/identity=""
codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false
codesign/entitlements/allow_dyld_environment_variables=false
codesign/entitlements/disable_library_validation=false
codesign/entitlements/audio_input=false
codesign/entitlements/camera=false
codesign/entitlements/location=false
codesign/entitlements/address_book=false
codesign/entitlements/calendars=false
codesign/entitlements/photos_library=false
codesign/entitlements/apple_events=false
codesign/entitlements/debugging=false
codesign/entitlements/app_sandbox/enabled=false
codesign/entitlements/app_sandbox/network_server=false
codesign/entitlements/app_sandbox/network_client=false
codesign/entitlements/app_sandbox/device_usb=false
codesign/entitlements/app_sandbox/device_bluetooth=false
codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0
codesign/entitlements/app_sandbox/files_user_selected=0
codesign/entitlements/app_sandbox/helper_executables=[]
codesign/custom_options=PackedStringArray()
notarization/notarization=0
privacy/microphone_usage_description=""
privacy/microphone_usage_description_localized={}
privacy/camera_usage_description=""
privacy/camera_usage_description_localized={}
privacy/location_usage_description=""
privacy/location_usage_description_localized={}
privacy/address_book_usage_description=""
privacy/address_book_usage_description_localized={}
privacy/calendar_usage_description=""
privacy/calendar_usage_description_localized={}
privacy/photos_library_usage_description=""
privacy/photos_library_usage_description_localized={}
privacy/desktop_folder_usage_description=""
privacy/desktop_folder_usage_description_localized={}
privacy/documents_folder_usage_description=""
privacy/documents_folder_usage_description_localized={}
privacy/downloads_folder_usage_description=""
privacy/downloads_folder_usage_description_localized={}
privacy/network_volumes_usage_description=""
privacy/network_volumes_usage_description_localized={}
privacy/removable_volumes_usage_description=""
privacy/removable_volumes_usage_description_localized={}
binary_format/embed_pck=false
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="#!/usr/bin/env bash
export DISPLAY=:0
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
\"{temp_dir}/{exe_name}\" {cmd_args}"
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""

View File

@ -18,7 +18,6 @@ config/icon="res://icon.svg"
[autoload]
CheckPoint="*res://Checkpoint/CheckPoint.gd"
Music="*res://Music/music.gd"
[input]