mirror of
https://github.com/Steffo99/pineapple-surf.git
synced 2024-11-21 23:34:21 +00:00
praise pineapple
This commit is contained in:
parent
4a17512954
commit
d99e14cfe3
14 changed files with 199 additions and 11 deletions
|
@ -1,3 +1,4 @@
|
|||
extends Node
|
||||
|
||||
var player: Player
|
||||
var score: int = 0
|
||||
|
|
1
assets/island_model/pineglasses.crocotile
Normal file
1
assets/island_model/pineglasses.crocotile
Normal file
File diff suppressed because one or more lines are too long
9
assets/island_model/pineglasses.mtl
Normal file
9
assets/island_model/pineglasses.mtl
Normal file
|
@ -0,0 +1,9 @@
|
|||
newmtl material3
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 1.000000 1.000000 1.000000
|
||||
Ks 0.000000 0.000000 0.000000
|
||||
Tr 0.000000
|
||||
illum 0
|
||||
Ns 0.000000
|
||||
map_Kd texture_3.png
|
||||
map_d texture_3.png
|
BIN
assets/island_model/pineglasses.obj
(Stored with Git LFS)
Normal file
BIN
assets/island_model/pineglasses.obj
(Stored with Git LFS)
Normal file
Binary file not shown.
21
assets/island_model/pineglasses.obj.import
Normal file
21
assets/island_model/pineglasses.obj.import
Normal file
|
@ -0,0 +1,21 @@
|
|||
[remap]
|
||||
|
||||
importer="wavefront_obj"
|
||||
importer_version=1
|
||||
type="Mesh"
|
||||
uid="uid://bgqpv20hlou2y"
|
||||
path="res://.godot/imported/pineglasses.obj-0618e7efc11f196892fc5dbb92c8519b.mesh"
|
||||
|
||||
[deps]
|
||||
|
||||
files=["res://.godot/imported/pineglasses.obj-0618e7efc11f196892fc5dbb92c8519b.mesh"]
|
||||
|
||||
source_file="res://assets/island_model/pineglasses.obj"
|
||||
dest_files=["res://.godot/imported/pineglasses.obj-0618e7efc11f196892fc5dbb92c8519b.mesh", "res://.godot/imported/pineglasses.obj-0618e7efc11f196892fc5dbb92c8519b.mesh"]
|
||||
|
||||
[params]
|
||||
|
||||
generate_tangents=true
|
||||
scale_mesh=Vector3(1, 1, 1)
|
||||
offset_mesh=Vector3(0, 0, 0)
|
||||
optimize_mesh=true
|
BIN
assets/island_model/texture_3.png
(Stored with Git LFS)
Normal file
BIN
assets/island_model/texture_3.png
(Stored with Git LFS)
Normal file
Binary file not shown.
36
assets/island_model/texture_3.png.import
Normal file
36
assets/island_model/texture_3.png.import
Normal file
|
@ -0,0 +1,36 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ceucx3sfu3345"
|
||||
path.s3tc="res://.godot/imported/texture_3.png-d3dad1a958de1723fe1a424bdcd308b3.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/texture_3.png-d3dad1a958de1723fe1a424bdcd308b3.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc", "etc2"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/island_model/texture_3.png"
|
||||
dest_files=["res://.godot/imported/texture_3.png-d3dad1a958de1723fe1a424bdcd308b3.s3tc.ctex", "res://.godot/imported/texture_3.png-d3dad1a958de1723fe1a424bdcd308b3.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
|
@ -3,25 +3,27 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c8pyyod83b2ge"
|
||||
path="res://.godot/imported/pineglasses.png-3c8c710eb23d2af3b8bb45908afa1208.ctex"
|
||||
path.s3tc="res://.godot/imported/pineglasses.png-3c8c710eb23d2af3b8bb45908afa1208.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/pineglasses.png-3c8c710eb23d2af3b8bb45908afa1208.etc2.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc", "etc2"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/pineglasses.png"
|
||||
dest_files=["res://.godot/imported/pineglasses.png-3c8c710eb23d2af3b8bb45908afa1208.ctex"]
|
||||
dest_files=["res://.godot/imported/pineglasses.png-3c8c710eb23d2af3b8bb45908afa1208.s3tc.ctex", "res://.godot/imported/pineglasses.png-3c8c710eb23d2af3b8bb45908afa1208.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=3
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
|
@ -31,4 +33,4 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
|
|
BIN
assets/sine.wav
(Stored with Git LFS)
Normal file
BIN
assets/sine.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
24
assets/sine.wav.import
Normal file
24
assets/sine.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
|||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dje4pc3vdya0d"
|
||||
path="res://.godot/imported/sine.wav-2be57ab950d171a5187be164508048f6.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sine.wav"
|
||||
dest_files=["res://.godot/imported/sine.wav-2be57ab950d171a5187be164508048f6.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
|
|
@ -13,6 +13,7 @@ func change_scene(path: String):
|
|||
|
||||
func start_game():
|
||||
print("Starting game...")
|
||||
Singletons.score = 0
|
||||
change_scene("res://island/Island.tscn")
|
||||
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
[ext_resource type="PackedScene" uid="uid://cxa5irr1atgke" path="res://island/PyramidSmallMesh.tscn" id="5_uf8hd"]
|
||||
[ext_resource type="PackedScene" uid="uid://bknwefv5ycc3u" path="res://island/PyramidSmolMesh.tscn" id="6_klmt8"]
|
||||
[ext_resource type="PackedScene" uid="uid://boxtb3trgcy8c" path="res://island/PillarMesh.tscn" id="7_grmwj"]
|
||||
[ext_resource type="PackedScene" uid="uid://c7dmda5c5ju28" path="res://island/TempleMesh.tscn" id="8_2yrdq"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwf11kdk7t64k" path="res://island/HoppityMesh.tscn" id="8_5pio0"]
|
||||
[ext_resource type="PackedScene" uid="uid://dp3n3j0r2ufhw" path="res://island/Temple.tscn" id="8_11ig5"]
|
||||
[ext_resource type="PackedScene" uid="uid://dutcugv574855" path="res://island/Leafpile.tscn" id="9_472aa"]
|
||||
[ext_resource type="PackedScene" uid="uid://v7bv81krh12e" path="res://island/Pineapple.tscn" id="10_dlxm4"]
|
||||
|
||||
|
@ -36,6 +36,9 @@ sky = SubResource("Sky_j6hso")
|
|||
|
||||
[node name="Island" type="Node3D"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("3_5378m")]
|
||||
transform = Transform3D(-1, 3.48787e-16, -8.74228e-08, 3.48787e-16, 1, -3.48787e-16, 8.74228e-08, -3.48787e-16, -1, 2.08165e-12, 3.896, 2.08165e-12)
|
||||
|
||||
[node name="World" type="Node3D" parent="."]
|
||||
metadata/_edit_lock_ = true
|
||||
|
||||
|
@ -99,7 +102,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 38)
|
|||
[node name="HoppityMesh" parent="World" instance=ExtResource("8_5pio0")]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -27, 0, 53)
|
||||
|
||||
[node name="TempleMesh" parent="World" instance=ExtResource("8_2yrdq")]
|
||||
[node name="Temple" parent="World" instance=ExtResource("8_11ig5")]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 20, 0, -4)
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_302o8")
|
||||
|
@ -108,9 +112,6 @@ environment = SubResource("Environment_302o8")
|
|||
transform = Transform3D(1, 0, 0, 0, -0.249636, 0.96834, 0, -0.96834, -0.249636, 0, 7.44648, 0)
|
||||
light_color = Color(1, 0.698039, 0.470588, 1)
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("3_5378m")]
|
||||
transform = Transform3D(-1, 3.48787e-16, -8.74228e-08, 3.48787e-16, 1, -3.48787e-16, 8.74228e-08, -3.48787e-16, -1, 2.08165e-12, 3.896, 2.08165e-12)
|
||||
|
||||
[node name="CropTiles" type="Node3D" parent="."]
|
||||
|
||||
[node name="Leafpile" parent="CropTiles" instance=ExtResource("9_472aa")]
|
||||
|
|
27
island/Temple.gd
Normal file
27
island/Temple.gd
Normal file
|
@ -0,0 +1,27 @@
|
|||
extends Node3D
|
||||
|
||||
|
||||
@export var size_per_prayer = 0.05
|
||||
@export var pitch_per_prayer = 0.02
|
||||
|
||||
@onready var player: Player = Singletons.player
|
||||
@onready var prayer_area: Area3D = $PrayerArea
|
||||
@onready var pineglasses: MeshInstance3D = $Pineglasses
|
||||
@onready var pineglasses_sound: AudioStreamPlayer3D = $Pineglasses/Growth
|
||||
|
||||
|
||||
func _physics_process(_delta):
|
||||
if prayer_area.overlaps_body(player):
|
||||
if player.collected_fruit > 0:
|
||||
if not pineglasses_sound.playing:
|
||||
pineglasses_sound.play()
|
||||
player.collected_fruit -= 1
|
||||
Singletons.score += 1
|
||||
pineglasses.scale += Vector3(size_per_prayer, size_per_prayer, size_per_prayer)
|
||||
pineglasses_sound.pitch_scale += pitch_per_prayer
|
||||
else:
|
||||
if pineglasses_sound.playing:
|
||||
pineglasses_sound.stop()
|
||||
else:
|
||||
if pineglasses_sound.playing:
|
||||
pineglasses_sound.stop()
|
56
island/Temple.tscn
Normal file
56
island/Temple.tscn
Normal file
|
@ -0,0 +1,56 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://dp3n3j0r2ufhw"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://c7dmda5c5ju28" path="res://island/TempleMesh.tscn" id="1_e3qkq"]
|
||||
[ext_resource type="Script" path="res://island/Temple.gd" id="1_ij5av"]
|
||||
[ext_resource type="Texture2D" uid="uid://ceucx3sfu3345" path="res://assets/island_model/texture_3.png" id="2_mx23r"]
|
||||
[ext_resource type="AudioStream" uid="uid://dje4pc3vdya0d" path="res://assets/sine.wav" id="4_wahrh"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_c2cin"]
|
||||
resource_name = "material3"
|
||||
transparency = 1
|
||||
shading_mode = 0
|
||||
albedo_texture = ExtResource("2_mx23r")
|
||||
texture_filter = 0
|
||||
billboard_mode = 1
|
||||
billboard_keep_scale = true
|
||||
|
||||
[sub_resource type="ArrayMesh" id="ArrayMesh_0bo7y"]
|
||||
_surfaces = [{
|
||||
"aabb": AABB(-0.5, 0, 0, 1.00001, 1.00001, 1e-05),
|
||||
"attribute_data": PackedByteArray(0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63),
|
||||
"format": 4119,
|
||||
"index_count": 6,
|
||||
"index_data": PackedByteArray(0, 0, 1, 0, 2, 0, 3, 0, 1, 0, 0, 0),
|
||||
"material": SubResource("StandardMaterial3D_c2cin"),
|
||||
"name": "material3",
|
||||
"primitive": 3,
|
||||
"vertex_count": 4,
|
||||
"vertex_data": PackedByteArray(0, 0, 0, 63, 0, 0, 128, 63, 0, 0, 0, 0, 255, 127, 255, 127, 255, 255, 255, 191, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 255, 127, 255, 127, 255, 255, 255, 191, 0, 0, 0, 191, 0, 0, 128, 63, 0, 0, 0, 0, 255, 127, 255, 127, 255, 255, 255, 191, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 255, 127, 255, 127, 255, 255, 255, 191)
|
||||
}]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_2m5mr"]
|
||||
size = Vector3(2, 2, 2)
|
||||
|
||||
[node name="Temple" type="Node3D"]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
|
||||
script = ExtResource("1_ij5av")
|
||||
|
||||
[node name="TempleMesh" parent="." instance=ExtResource("1_e3qkq")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 10, 0, -3)
|
||||
skeleton = NodePath("../../..")
|
||||
|
||||
[node name="Pineglasses" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(3.93403e-07, 0, 3, 0, 3, 0, -3, 0, 3.93403e-07, 1, 5, -1)
|
||||
mesh = SubResource("ArrayMesh_0bo7y")
|
||||
skeleton = NodePath("../../..")
|
||||
|
||||
[node name="Growth" type="AudioStreamPlayer3D" parent="Pineglasses"]
|
||||
transform = Transform3D(4.37114e-08, 0, -0.333333, 0, 0.333333, 0, 0.333333, 0, 4.37114e-08, 0, 0, -1.2219e-06)
|
||||
stream = ExtResource("4_wahrh")
|
||||
|
||||
[node name="PrayerArea" type="Area3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.5, 5, -1)
|
||||
monitorable = false
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="PrayerArea"]
|
||||
shape = SubResource("BoxShape3D_2m5mr")
|
Loading…
Reference in a new issue