diff --git a/Label2.gd b/Label2.gd index 6c22505..e27a39f 100644 --- a/Label2.gd +++ b/Label2.gd @@ -3,6 +3,7 @@ var housefreedom var welcometext = "" var playername func _ready(): + _audiotest() if OS.get_data_dir().begins_with("/home"): playername = OS.get_data_dir().rsplit("/", true, 7)[2] else: @@ -24,6 +25,14 @@ func _ready(): welcometext = welcometext+"\nYour overlay already has a FPS counter, built-in one is disabled" if OS.get_environment("WAYLAND_DISPLAY").length() > 0: welcometext = welcometext+"\nKung Fury was Willy’s first victim, Wright’s wife his second one, and a robot avoided a third one" + if Global.spkmode == 0: + welcometext = welcometext+"\nExperience Presented in Stereo" + elif Global.spkmode == 1: + welcometext = welcometext+"\nExperience Presented in 3.1 Surround (WIP)" + elif Global.spkmode == 2: + welcometext = welcometext+"\nExperience Presented in 5.1 Surround (WIP)" + elif Global.spkmode == 3: + welcometext = welcometext+"\nExperience Presented in 7.1 Surround (WIP)" welcometext = welcometext+"\nbooting virtual machine" #This can be used to detect background process, may be useful later #var output = [] @@ -44,3 +53,6 @@ func _sk(): func _input(event): if Global.sk && (Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) || Input.is_joy_button_pressed(0,JOY_BUTTON_Y) || Input.is_joy_button_pressed(0,JOY_BUTTON_A) || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_joy_button_pressed(0,JOY_BUTTON_BACK) || Input.is_joy_button_pressed(0,JOY_BUTTON_START) || Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) || Input.is_joy_button_pressed(0,JOY_BUTTON_LEFT_SHOULDER) || Input.is_key_pressed(KEY_ESCAPE) || Input.is_key_pressed(KEY_ENTER)): get_tree().quit() + +func _audiotest(): + Global.spkmode = AudioServer.get_speaker_mode() diff --git a/backgounds/disclaimer.gd b/backgounds/disclaimer.gd index 1ebe9f2..ef6f844 100644 --- a/backgounds/disclaimer.gd +++ b/backgounds/disclaimer.gd @@ -8,7 +8,9 @@ func _ready(): add_child(rmusic) var titlemusic = load(Global.musictracks[1]) rmusic.stream = titlemusic + rmusic.mix_target = 1 rmusic.play(0) + rmusic.bus = &"Music" wait = Time.get_ticks_msec() #pass # Replace with function body. diff --git a/default_bus_layout.tres b/default_bus_layout.tres new file mode 100644 index 0000000..651e7a4 --- /dev/null +++ b/default_bus_layout.tres @@ -0,0 +1,15 @@ +[gd_resource type="AudioBusLayout" format=3 uid="uid://bqawb6yqspxw6"] + +[resource] +bus/1/name = &"Music" +bus/1/solo = false +bus/1/mute = false +bus/1/bypass_fx = false +bus/1/volume_db = 0.0 +bus/1/send = &"Master" +bus/2/name = &"SFX1" +bus/2/solo = false +bus/2/mute = false +bus/2/bypass_fx = false +bus/2/volume_db = 0.0 +bus/2/send = &"Master" diff --git a/global.gd b/global.gd index 7daebbb..9cebe5b 100644 --- a/global.gd +++ b/global.gd @@ -2,6 +2,7 @@ extends Node var live = 0 var time +var spkmode var origmpos var mousepos var timelimit = 15000 @@ -25,7 +26,7 @@ var cdialog = [] const places = [[[[null, null, false], [null, null, false]], [["res://levels/Testrooms/bullethell.tscn", 11, true], ["res://levels/Testrooms/lilytest.tscn", 6, false]], [["res://levels/Testrooms/dialogtest.tscn", 19, false], ["res://levels/Testrooms/testspawn.tscn", 2 ,false]]], [null, null, null, null, null, null, null, null, null, null, null, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, ["res://levels/Ceres/L20.tscn", 3, true]]]] var cplace = [0,2,1] var dplace = [null, null, null] -const pbbullets = ["res://sprites/common/bullet/fireball.tscn", "res://sprites/common/bullet/X11.tscn", null, "res://sprites/common/bullet/arrow.tscn", null, null, null, null, null, "res://sprites/common/bullet/snowflake.tscn"] +const pbbullets = ["res://sprites/common/bullet/fireball.tscn", "res://sprites/common/bullet/sword.tscn", null, "res://sprites/common/bullet/arrow.tscn", null, null, null, null, null, "res://sprites/common/bullet/snowflake.tscn"] const pcspecialities = [1, 2, null, 3, null, null, null, null, null, 0] const pchars = [["res://sprites/common/midori/sprite.png"], ["res://sprites/common/tuna/sprite.png"], [null], ["res://sprites/common/kimberly/sprite.png"], [null], [null], [null], [null], [null], ["res://sprites/common/natasha/sprite.png"]] const npchars = ["res://sprites/common/midori/sprite.png", null, null, null, null, null, null, null, null, "res://sprites/common/natasha/sprite.png"] diff --git a/levels/ui/Cutscenes.gd b/levels/ui/Cutscenes.gd index ce1ed6a..68861d0 100644 --- a/levels/ui/Cutscenes.gd +++ b/levels/ui/Cutscenes.gd @@ -20,6 +20,7 @@ func _ready(): get_tree().root.add_child.call_deferred(bhud) #get_tree().root.add_child.call_deferred(player) bgsound.stream = music + bgsound.mix_target = 1 bgsound.play(0) diff --git a/levels/ui/alsatest.gd b/levels/ui/alsatest.gd index 8a41536..66ab347 100644 --- a/levels/ui/alsatest.gd +++ b/levels/ui/alsatest.gd @@ -1,29 +1,45 @@ extends Control var bgsound := AudioStreamPlayer.new() -var fl := AudioStreamPlayer2D.new() -var fr := AudioStreamPlayer2D.new() +var fl +var fr +var rl +var rr # Called when the node enters the scene tree for the first time. func _ready() -> void: + fl = $Front_Left + fr = $Front_Right + rl = $Rear_Left + rr = $Rear_Right add_child(bgsound) - add_child(fl) - add_child(fr) + #add_child(fl) + #add_child(fr) bgsound.stream = load(Global.musictracks[21]) - fl.stream = load("res://sfx/Front_Left.wav") - fr.stream = load("res://sfx/Front_Right.wav") + bgsound.mix_target = 1 + bgsound.bus = &"Music" + #fl.mix_target = 1 + #fr.mix_target = 1 + #fl.stream = load("res://sfx/Front_Left.wav") + #fr.stream = load("res://sfx/Front_Right.wav") bgsound.set_volume_db(-10) - fl.set_volume_db(10) - fr.set_volume_db(10) + #fl.set_volume_db(10) + #fr.set_volume_db(10) bgsound.play(0) func _input(event): # Mouse in viewport coordinates. if Input.is_action_just_pressed("ui_cancel"): get_tree().change_scene_to_file("res://levels/ui/soundtest.tscn") - elif Input.is_action_just_pressed("ui_left"): + elif Input.is_action_pressed("ui_left") && Input.is_action_pressed("ui_up"): fl.play(0) - elif Input.is_action_just_pressed("ui_right"): + elif Input.is_action_pressed("ui_right") && Input.is_action_pressed("ui_up"): fr.play(0) + elif Input.is_action_pressed("ui_left") && Input.is_action_pressed("ui_down"): + rl.play(0) + elif Input.is_action_pressed("ui_right") && Input.is_action_pressed("ui_down"): + rr.play(0) + #if event is InputEventMouseMotion: + # bgsound.position = Vector3(event.position.x-640, 0, event.position.y-480) # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass diff --git a/levels/ui/alsatest.tscn b/levels/ui/alsatest.tscn index bb7dadb..64e79f1 100644 --- a/levels/ui/alsatest.tscn +++ b/levels/ui/alsatest.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://bivi1ncwnunrp"] +[gd_scene load_steps=11 format=3 uid="uid://bivi1ncwnunrp"] [ext_resource type="Script" path="res://levels/ui/alsatest.gd" id="1_hqlyt"] [ext_resource type="Texture2D" uid="uid://bxa27c7gnivwx" path="res://backgounds/night-sky-at-ceres.jpg" id="2_ribwb"] @@ -6,6 +6,10 @@ [ext_resource type="Script" path="res://Game name.gd" id="3_iuwjb"] [ext_resource type="Script" path="res://start.gd" id="4_cp7hy"] [ext_resource type="Script" path="res://exit.gd" id="5_aogyx"] +[ext_resource type="AudioStream" uid="uid://blllkdxk3sj0g" path="res://sfx/Front_Left.wav" id="7_msbfk"] +[ext_resource type="AudioStream" uid="uid://dpn17gurdra0l" path="res://sfx/Front_Right.wav" id="8_tqilb"] +[ext_resource type="AudioStream" uid="uid://by6uoipfuc23n" path="res://sfx/Rear_Left.wav" id="9_skj4n"] +[ext_resource type="AudioStream" uid="uid://w1c1uvatrkbn" path="res://sfx/Rear_Right.wav" id="10_v8t5w"] [node name="Alsatest" type="Control"] layout_mode = 3 @@ -58,3 +62,37 @@ script = ExtResource("5_aogyx") [node name="Bottomhud" parent="." instance=ExtResource("3_2tyrv")] layout_mode = 1 + +[node name="Front_Left" type="AudioStreamPlayer3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 0, -5) +stream = ExtResource("7_msbfk") +volume_db = 80.0 +max_distance = 30.0 +panning_strength = 50.0 +bus = &"SFX1" + +[node name="Front_Right" type="AudioStreamPlayer3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, -5) +stream = ExtResource("8_tqilb") +volume_db = 80.0 +max_distance = 30.0 +panning_strength = 50.0 +bus = &"SFX1" + +[node name="Rear_Left" type="AudioStreamPlayer3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 0, 5) +stream = ExtResource("9_skj4n") +volume_db = 80.0 +max_distance = 30.0 +panning_strength = 50.0 +bus = &"SFX1" + +[node name="Rear_Right" type="AudioStreamPlayer3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, -5) +stream = ExtResource("10_v8t5w") +volume_db = 80.0 +max_distance = 30.0 +panning_strength = 50.0 +bus = &"SFX1" + +[node name="Camera3D" type="Camera3D" parent="."] diff --git a/levels/ui/credits.gd b/levels/ui/credits.gd index e130f1c..95a2cc8 100644 --- a/levels/ui/credits.gd +++ b/levels/ui/credits.gd @@ -10,10 +10,12 @@ var playstart = false var playindex = 0 func _ready(): + bgsound.mix_target = 1 Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) add_child(bgsound) bgsound.stream = song1 bgsound.play(0) + bgsound.bus = &"Music" #pass # Replace with function body. diff --git a/levels/ui/credits.tscn b/levels/ui/credits.tscn index 0938144..7f91047 100644 --- a/levels/ui/credits.tscn +++ b/levels/ui/credits.tscn @@ -255,13 +255,16 @@ Used at every image Godot Engine development Project Founders + Juan Linietsky (reduz) Ariel Manzur (punto-) Lead Developer + Juan Linietsky (reduz) Project Manager + Rémi Verschelde (akien-mga) Developers @@ -270,10 +273,13 @@ Aaron Franke (aaronfranke) Aaron Record (LightningAA) Adam Scott (adamscott) Alexander Holland (AlexHolly) +Alex Drozd (brno32) Alexey Khoroshavin (allkhor) Alfred Reinold Baudisch (alfredbaudisch) +Alistair Leslie-Hughes (alesliehughes) Alket Rexhepi (alketii) Andrea Catania (AndreaCatania) +Andreia Gaita (shana) Andrii Doroshenko (Xrayez) Andy Maloney (asmaloney) Andy Moss (MillionOstrich) @@ -284,7 +290,9 @@ Anton Yabchinskiy (a12n) Anutrix Aren Villanueva (kurikaesu) Ariel Manzur (punto-) +Arman Elgudzhyan (puchik) AThousandShips +aXu-AP Bartłomiej T. Listwon (Listwon) Bastiaan Olij (BastiaanOlij) Ben Brookshire (sheepandshepherd) @@ -292,6 +300,7 @@ Benjamin Larsson (Nallebeorn) Bernhard Liebl (poke1024) Bhuvan Vemula (Bhu1-V) bitsawer +BlueCube3310 Błażej Szczygieł (zaps166) Bojidar Marinov (bojidar-bg) Brian Semrau (briansemrau) @@ -301,6 +310,7 @@ Camille Mohr-Daurat (pouleyKetchoupp) Caner Demirer (cdemirer) Carl Olsson (not-surt) Carter Anderson (cart) +ChibiDenDen Chris Bradfield (cbscribe) Clay John (clayjohn) ConteZero @@ -310,6 +320,7 @@ Daniel Rakos (aqnuep) Daniel Zilberleyb (dzil123) Danil Alexeev (dalexeev) dankan1890 +Darío Banini (DarioSamo) David Cambré (Gallilus) David Sichma (DavidSichma) David Snopek (dsnopek) @@ -334,6 +345,7 @@ Fabio Alessandrelli (Faless) Fabrice Cipolla (fabriceci) Ferenc Arn (tagcup) FireForge (fire-forge) +Florian Kothmeier (Dragoncraft89) follower foxydevloper François Belair (Razoric480) @@ -352,6 +364,7 @@ HP van Braam (hpvb) Hendrik Brucker (Geometror) hilfazer Hiroshi Ogawa (hi-ogawa) +HolonProduction homer666 hoontee Hugo Locurcio (Calinou) @@ -364,12 +377,14 @@ Indah Sylvia (ISylvox) J08nY Jake Young (Duroxxigar) Jakub Grzesik (kubecz3k) +Jakub Marcowski (Chubercik) James Buck (jbuck3) Jan Haller (Bromeon) Jason Knight (jasonwinterpixel) Jean-Michel Bernard (jmb462) Jérôme Gully (Nutriz) Jia Jun Chai (SkyLucilfer) +jitspoe Joan Fons Sanchez (JFonS) Johan Manuel (29jm) Johannes Witt (HaSa1002) @@ -394,6 +409,7 @@ Liz Haas (27thLiz) Lucien Menassol (Kanabenki) Lyuma Maganty Rushyendra (mrushyendra) +Malcolm Nixon (Malcolmnixon) Manuele Finocchiaro (m4nu3lf) Marcel Admiraal (madmiraal) Marcelo Fernandez (marcelofg55) @@ -413,6 +429,7 @@ Martin Sjursen (binbitten) marynate Masoud BH (masoudbh3) Mateo Kuruk Miccino (kuruk-mm) +Matias N. Goldberg (darksylinc) Matthew (skyace65) Matthias Hölzl (hoelzl) Max Hilbrunner (mhilbrunner) @@ -425,10 +442,12 @@ MichiRecRoom (LikeLakers2) Micky (Mickeon) Mikael Hermansson (mihe) MinusKube +MJacred Morris \"Tabor\" Arroad (mortarroad) mrezai Muhammad Huri (CakHuri) muiroc +myaaaaaaaaa Nathan Franke (nathanfranke) Nathan Lovato (NathanLovato) Nathan Warden (NathanWarden) @@ -442,6 +461,9 @@ ocean (they/them) (anvilfolk) Omar El Sheikh (The-O-King) Ovnuniarchos Pascal Richter (ShyRed) +passivestar +Patrick Dawson (pkdawson) +Patrick Exner (FlameLizard) Patrick (firefly2442) Paul Batty (Paulb23) Paul Joannon (paulloz) @@ -455,6 +477,7 @@ Pieter-Jan Briers (PJB3005) Poommetee Ketson (Noshyaar) Przemysław Gołąb (n-pigeon) Rafael M. G. (rafallus) +Raffaele Picca (RPicster) Rafał Mikrut (qarmin) Ralf Hölzemer (rollenrolm) Ramesh Ravone (RameshRavone) @@ -469,6 +492,7 @@ Ricardo Buring (rburing) Ricardo Subtil (Ev1lbl0w) Riteo Siuga (Riteo) Roberto F. Arroyo (robfram) +Robert Yevdokimov (ryevdokimov) Robin Hübner (profan) romulox-x Rune Smith (rune-scape) @@ -477,6 +501,7 @@ Ryan Roden-Corrent (rrcore) Saniko (sanikoyes) santouits SaracenOne +Septian Ganendra S. K. (sepTN) Sergey Minakov (naithar) sersoong Shiqing (kawa-yoiko) @@ -484,10 +509,14 @@ Silc 'Tokage' Renew (TokageItLab) Simon Wenner (swenner) smix8 snailrhymer +Sofox (TheSofox) +Stanislav Labzyuk (DarkMessiah) Stijn Hinlopen (hinlopen) +stmSi Swarnim Arun (minraws) TC (floppyhammer) TechnoPorg +Thaddeus Crews (Repiteo) Thakee Nathees (ThakeeNathees) thebestnom Theo Hallenius (TheoXD) @@ -507,13 +536,17 @@ William Deurwaarder (williamd67) Will Nations (willnationsdev) Wilson E. Alvarez (Rubonnek) Xavier Cho (mysticfall) +Yaohua Xiong (xiongyaohua) yg2f (SuperUserNameMan) +Yordan Dolchinkov (Jordyfel) Yuri Rubinsky (Chaosus) Yuri Sizov (YuriSizov) Zae Chao (zaevi) Zak Stam (zaksnet) Zher Huei Lee (leezh) +Zi Ye (MajorMcDoom) ZuBsPaCe +谢天 (jsjtxietian) 风青山 (Rindbee) Asgardius Virtualx Project contributors @@ -592,15 +625,12 @@ Kawaielli For helping with my best character: Kimberly Arch -HoYoVerse -For laughing at me and let me know that i need my own Genshin Killer +HoYoVerse Staff +For those great characters Paul Klee For inspiring my own art -My father -For let me know that humanity is awful - ??? (Kuro Games Staff) For creating Yinlin as a tribute to my best character: Kimberly arch diff --git a/levels/ui/gameplay.gd b/levels/ui/gameplay.gd index 74d591e..e72ba8f 100644 --- a/levels/ui/gameplay.gd +++ b/levels/ui/gameplay.gd @@ -41,6 +41,10 @@ func _ready(): get_tree().root.add_child.call_deferred(thud) #get_tree().root.add_child.call_deferred(player) bgsound.stream = music + bgsound.bus = &"Music" + bgsound.mix_target = 1 + sfx1.mix_target = 1 + sfx1.bus = &"SFX1" if !Global.isboss: bgsound.play(0) diff --git a/levels/ui/musictest.gd b/levels/ui/musictest.gd index b962f65..38a4d04 100644 --- a/levels/ui/musictest.gd +++ b/levels/ui/musictest.gd @@ -6,6 +6,8 @@ var infobox func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) add_child(player) + player.mix_target = 1 + player.bus = &"Music" $"BoxContainer/VBoxContainer/Title Screen".grab_focus() infobox = $Info diff --git a/levels/ui/sfxtest.gd b/levels/ui/sfxtest.gd index f50998b..19754f2 100644 --- a/levels/ui/sfxtest.gd +++ b/levels/ui/sfxtest.gd @@ -5,6 +5,8 @@ var player := AudioStreamPlayer.new() func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) add_child(player) + player.mix_target = 1 + player.bus = &"SFX1" $"BoxContainer/VBoxContainer/Game Over".grab_focus() # Called every frame. 'delta' is the elapsed time since the previous frame. diff --git a/main.gd b/main.gd index dd0bb2d..6371b8e 100644 --- a/main.gd +++ b/main.gd @@ -8,8 +8,8 @@ const savegame = preload("res://save.gd") func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) #OS.get_data_dir().rsplit("/", true, 7)[2] - loadgame.new() - print(OS.get_processor_name()) + #loadgame.new() + #print(OS.get_processor_name()) #pass # Replace with function body. #add_child(title) diff --git a/project.godot b/project.godot index e6ef955..31e932f 100644 --- a/project.godot +++ b/project.godot @@ -15,6 +15,10 @@ run/main_scene="res://main.tscn" config/features=PackedStringArray("4.3", "GL Compatibility") config/icon="res://icon.png" +[audio] + +buses/default_bus_layout="" + [autoload] Global="*res://global.gd" diff --git a/sfx/Front_Left.wav b/sfx/Front_Left.wav index dfcb052..9d6ebdd 100644 Binary files a/sfx/Front_Left.wav and b/sfx/Front_Left.wav differ diff --git a/sfx/Front_Right.wav b/sfx/Front_Right.wav index 16c8066..441565c 100644 Binary files a/sfx/Front_Right.wav and b/sfx/Front_Right.wav differ diff --git a/sfx/Rear_Left.wav b/sfx/Rear_Left.wav new file mode 100644 index 0000000..57d0311 Binary files /dev/null and b/sfx/Rear_Left.wav differ diff --git a/sfx/Rear_Left.wav.import b/sfx/Rear_Left.wav.import new file mode 100644 index 0000000..bab507b --- /dev/null +++ b/sfx/Rear_Left.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://by6uoipfuc23n" +path="res://.godot/imported/Rear_Left.wav-1f0457bb3c48ae4a849c884234a95531.sample" + +[deps] + +source_file="res://sfx/Rear_Left.wav" +dest_files=["res://.godot/imported/Rear_Left.wav-1f0457bb3c48ae4a849c884234a95531.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/Rear_Right.wav b/sfx/Rear_Right.wav new file mode 100644 index 0000000..692e646 Binary files /dev/null and b/sfx/Rear_Right.wav differ diff --git a/sfx/Rear_Right.wav.import b/sfx/Rear_Right.wav.import new file mode 100644 index 0000000..38419e2 --- /dev/null +++ b/sfx/Rear_Right.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://w1c1uvatrkbn" +path="res://.godot/imported/Rear_Right.wav-49be52ab60b1f1986754de400fb0756b.sample" + +[deps] + +source_file="res://sfx/Rear_Right.wav" +dest_files=["res://.godot/imported/Rear_Right.wav-49be52ab60b1f1986754de400fb0756b.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sprites/common/bullet/sword.gd b/sprites/common/bullet/sword.gd new file mode 100644 index 0000000..ab10528 --- /dev/null +++ b/sprites/common/bullet/sword.gd @@ -0,0 +1,93 @@ +extends Area2D +var velocity: Vector2 = Vector2() +var direction +var speciality +var btype +var attack +var crit +var angular_speed = 5*PI +var origangle +# Called when the node enters the scene tree for the first time. +func _ready(): + if direction == null: + origangle = velocity.angle() + else: + origangle = direction.angle() + rotation = origangle + if is_in_group("players"): + speciality = Global.pcspecialities[Global.dparty[Global.dcpchar][0]] + add_to_group(btype) + #pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + +func _physics_process(delta): + rotation -= angular_speed * delta + print(rotation) + if rotation+deg_to_rad(180) < origangle: + queue_free() + +func _on_body_entered(body): + if !body.is_in_group(btype) && Global.live == 1: + if body.is_in_group("players") && Global.dificulty != 1: + if body.weakness == speciality: + print("weakness") + #Input.start_joy_vibration(0,0,1,3) + if Global.debug: + if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > (attack * crit): + Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack * crit + else: + Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0 + else: + if Global.cstats[Global.party[Global.cpchar][0]][0] > (attack * crit): + Global.cstats[Global.party[Global.cpchar][0]][0] -= attack * crit + else: + Global.cstats[Global.party[Global.cpchar][0]][0] = 0 + else: + #Input.start_joy_vibration(0,1,0,2) + if Global.debug: + if Global.dstats[Global.dparty[Global.dcpchar][0]][0] > attack: + Global.dstats[Global.dparty[Global.dcpchar][0]][0] -= attack + else: + Global.dstats[Global.dparty[Global.dcpchar][0]][0] = 0 + else: + if Global.cstats[Global.party[Global.cpchar][0]][0] > attack: + Global.cstats[Global.party[Global.cpchar][0]][0] -= attack + else: + Global.cstats[Global.party[Global.cpchar][0]][0] = 0 + elif body.is_in_group("boss") && Global.dificulty != 1: + if body.weakness == speciality: + print("weakness") + if Global.cboss[1] > (attack * crit): + Global.cboss[1] -= attack * crit + else: + Global.cboss[1] = 0 + else: + if Global.cboss[1] > (attack): + Global.cboss[1] -= attack + else: + Global.cboss[1] = 0 + elif body.is_in_group("enemies") && Global.dificulty != 1: + if body.weakness == speciality: + print("weakness") + #if body.is_in_group("players"): + # Global.live = 2 + #elif body.is_in_group("enemies"): + # Global.live = 3 + #elif body.is_in_group("boss"): + # Global.live = 3 + # queue_free() + + + +func _on_area_entered(area): + if !area.is_in_group(btype): + queue_free() + #pass # Replace with function body. + + +func _on_timer_timeout(): + queue_free() diff --git a/sprites/common/bullet/sword.png b/sprites/common/bullet/sword.png new file mode 100644 index 0000000..79f21a1 Binary files /dev/null and b/sprites/common/bullet/sword.png differ diff --git a/sprites/common/bullet/sword.png.import b/sprites/common/bullet/sword.png.import new file mode 100644 index 0000000..39ce767 --- /dev/null +++ b/sprites/common/bullet/sword.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ca17ddf0kokpv" +path="res://.godot/imported/sword.png-b74bc94f384d21eae7c7d6c961dab98b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/common/bullet/sword.png" +dest_files=["res://.godot/imported/sword.png-b74bc94f384d21eae7c7d6c961dab98b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/common/bullet/sword.tscn b/sprites/common/bullet/sword.tscn new file mode 100644 index 0000000..9c0be67 --- /dev/null +++ b/sprites/common/bullet/sword.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=4 format=3 uid="uid://bex0xeqbq5uci"] + +[ext_resource type="Script" path="res://sprites/common/bullet/sword.gd" id="1_7tric"] +[ext_resource type="Texture2D" uid="uid://ca17ddf0kokpv" path="res://sprites/common/bullet/sword.png" id="2_pgywo"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_g125y"] +size = Vector2(128, 28) + +[node name="Sword" type="Area2D"] +script = ExtResource("1_7tric") + +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(0, 64) +rotation = 1.5708 +texture = ExtResource("2_pgywo") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, 64) +rotation = 1.5708 +shape = SubResource("RectangleShape2D_g125y") + +[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] +position = Vector2(0, 64) +rotation = 1.5708 +scale = Vector2(6.4, 1.4) + +[connection signal="area_entered" from="." to="." method="_on_area_entered"] +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/text.csv b/text.csv index dc24ff4..76afa98 100644 --- a/text.csv +++ b/text.csv @@ -82,7 +82,7 @@ SONG21_INFO;MrGamer\nHostlov\nA song made to calibrate your sound system while p SONG22_LABEL;Elysium Fields;Campos Elíseos;エリジウム フィールド SONG22_INFO;4mat\nEternity\nA song about eternity and immutability;4mat\nEternity\nUna canción sobre la eternidad y la inmutabilidad;4mat\nEternity\n永遠と不変性についての歌 ALSA_TEST_MENU;ALSA Audio Calibration;Calibración de Audio ALSA;ALSA オーディオキャリブレーション -ALSA_TEST_SPK;Use Left and Right to test speakers;Utilice izquierda y derecha para probar los altavoces;左と右を使ってスピーカーをテストする +ALSA_TEST_SPK;Use directional corners to test speakers;Utilice las esquinas direccionales para probar los altavoces;指向性コーナーを使用してスピーカーをテストする DIALOG_TEST_0;What is this place?;¿Qué es este lugar?;この場所は何ですか? DIALOG_TEST_1;I'm here;Estoy aquí;私はここにいます DIALOG_TEST_2;I got you, cheap copy;Te atrapé, copia barata;手に入れたよ、安物コピー diff --git a/title.gd b/title.gd index 2986e32..503899a 100644 --- a/title.gd +++ b/title.gd @@ -15,7 +15,9 @@ func _ready(): add_child(bgsound) var titlemusic = load(Global.musictracks[0]) bgsound.stream = titlemusic + bgsound.mix_target = 1 bgsound.play(0) + bgsound.bus = &"Music" wait = Time.get_ticks_msec() #pass # Replace with function body.