mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
secret collectibles WIP! (:
This commit is contained in:
parent
1603417c33
commit
7e4c77dd49
11 changed files with 155 additions and 7 deletions
21
src/actor/Note.gd
Normal file
21
src/actor/Note.gd
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
tool
|
||||
extends Actor
|
||||
|
||||
onready var sprite := $Sprite
|
||||
|
||||
export var gra : Gradient
|
||||
var clock := 0.0
|
||||
export var duration := 1.0
|
||||
|
||||
var bounce := 0.0
|
||||
|
||||
func _physics_process(delta):
|
||||
if Engine.editor_hint: return
|
||||
|
||||
# clock += delta
|
||||
# clock = fmod(clock, duration)
|
||||
# sprite.modulate = gra.interpolate(clock / duration)
|
||||
|
||||
bounce += delta * 2.5
|
||||
sprite.offset.y = sin(bounce) * 1.5
|
||||
|
||||
26
src/actor/Note.tscn
Normal file
26
src/actor/Note.tscn
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://src/actor/Note.gd" type="Script" id=1]
|
||||
[ext_resource path="res://media/image/HarmonyHoneyLogo.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="Gradient" id=1]
|
||||
interpolation_mode = 2
|
||||
offsets = PoolRealArray( 0, 0.33, 0.66, 1 )
|
||||
colors = PoolColorArray( 1, 0, 0.301961, 1, 0, 0.894118, 0.211765, 1, 0.160784, 0.678431, 1, 1, 1, 0, 0.301961, 1 )
|
||||
|
||||
[node name="Note" type="Node2D"]
|
||||
z_index = 10
|
||||
z_as_relative = false
|
||||
script = ExtResource( 1 )
|
||||
hitbox_x = 10
|
||||
hitbox_y = 10
|
||||
tag = "note"
|
||||
gra = SubResource( 1 )
|
||||
duration = 3.0
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
modulate = Color( 1, 0.945098, 0.909804, 1 )
|
||||
position = Vector2( 5, 5 )
|
||||
texture = ExtResource( 2 )
|
||||
region_enabled = true
|
||||
region_rect = Rect2( 4, 2, 14, 14 )
|
||||
|
|
@ -51,6 +51,9 @@ var btnp_pick = false
|
|||
|
||||
export var is_attract_mode = false
|
||||
|
||||
func _enter_tree():
|
||||
Shared.player = self
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
if Engine.editor_hint or Shared.is_level_select:
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ var current_map := 0
|
|||
var maps := []
|
||||
|
||||
var actors := []
|
||||
var player
|
||||
|
||||
func _ready():
|
||||
print("Shared._ready(): ")
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ margin_left = 12.0
|
|||
margin_top = -7.0
|
||||
margin_right = 42.0
|
||||
margin_bottom = 6.0
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
|
||||
custom_constants/shadow_as_outline = 1
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
text = "move"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=12 format=2]
|
||||
[gd_scene load_steps=14 format=2]
|
||||
|
||||
[ext_resource path="res://src/stage/SolidTileMap.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/actor/Box.tscn" type="PackedScene" id=2]
|
||||
|
|
@ -11,12 +11,14 @@
|
|||
[ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=9]
|
||||
[ext_resource path="res://media/image/btn.png" type="Texture" id=10]
|
||||
[ext_resource path="res://src/menu/hide_on_level_select.gd" type="Script" id=11]
|
||||
[ext_resource path="res://src/actor/Note.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://src/stage/ObscureMap.tscn" type="PackedScene" id=13]
|
||||
|
||||
[node name="Stage" type="Node2D"]
|
||||
script = ExtResource( 8 )
|
||||
|
||||
[node name="SolidTileMap" parent="." instance=ExtResource( 1 )]
|
||||
tile_data = PoolIntArray( -458762, 536870912, 0, -458761, 0, 1, -458760, 0, 0, -458759, 0, 1, -458758, 536870912, 0, -458757, 0, 1, -458756, 0, 1, -458755, 0, 0, -458754, 0, 1, -458753, 536870912, 0, -524288, 0, 1, -524287, 0, 1, -524286, 536870912, 0, -524285, 0, 1, -524284, 0, 0, -393226, 0, 1, -458748, 0, 1, -327690, 536870912, 0, -393212, 0, 0, -393211, 0, 1, -393210, 536870912, 0, -262154, 536870912, 0, -262153, 0, 1, -262152, 0, 1, -262151, 0, 0, -262150, 0, 1, -262149, 536870912, 0, -327674, 536870912, 0, -196616, 536870912, 0, -262138, 0, 1, -131080, 0, 1, -196602, 536870912, 0, -65549, 536870912, 0, -65548, 0, 1, -65547, 0, 0, -65546, 0, 1, -65545, 536870912, 0, -65544, 536870912, 0, -131066, 0, 1, -13, 536870912, 0, -65530, 536870912, 0, 65523, 0, 1, 65534, 536870912, 0, 65535, 0, 1, 0, 0, 0, 1, 0, 1, 2, 536870912, 0, 3, 0, 1, 4, 0, 0, 5, 0, 1, 6, 536870912, 0, 131059, 0, 0, 131070, 0, 1, 196595, 0, 1, 196606, 0, 0, 262131, 536870912, 0, 262142, 0, 1, 327667, 536870912, 0, 327668, 0, 1, 327669, 0, 0, 327670, 0, 1, 327671, 536870912, 0, 327672, 0, 1, 327673, 0, 1, 327674, 0, 0, 327675, 0, 1, 327676, 536870912, 0, 327677, 0, 1, 327678, 536870912, 0 )
|
||||
tile_data = PoolIntArray( -524303, 536870913, 0, -524302, 536870913, 0, -524301, 536870913, 0, -524300, 536870913, 0, -524299, 536870913, 0, -524298, 536870913, 0, -458767, 536870913, 0, -458762, 536870912, 0, -458761, 0, 1, -458760, 0, 0, -458759, 0, 1, -458758, 536870912, 0, -458757, 0, 1, -458756, 0, 1, -458755, 0, 0, -458754, 0, 1, -458753, 536870912, 0, -524288, 0, 1, -524287, 0, 1, -524286, 536870912, 0, -524285, 0, 1, -524284, 0, 0, -393231, 536870913, 0, -393226, 0, 1, -458748, 0, 1, -327695, 536870913, 0, -327690, 536870912, 0, -393212, 0, 0, -393211, 0, 1, -393210, 536870912, 0, -262159, 536870913, 0, -262154, 536870912, 0, -262153, 0, 1, -262152, 0, 1, -262151, 0, 0, -262150, 0, 1, -262149, 536870912, 0, -327674, 536870912, 0, -196623, 536870913, 0, -262138, 0, 1, -131087, 536870913, 0, -196602, 536870912, 0, -65551, 536870913, 0, -65550, 536870913, 0, -65549, 536870912, 0, -65548, 0, 1, -65547, 0, 0, -65546, 0, 1, -65545, 536870912, 0, -65544, 536870912, 0, -131066, 0, 1, -13, 536870912, 0, -65530, 536870912, 0, 65523, 0, 1, 65534, 536870912, 0, 65535, 0, 1, 0, 0, 0, 1, 0, 1, 2, 536870912, 0, 3, 0, 1, 4, 0, 0, 5, 0, 1, 6, 536870912, 0, 131059, 0, 0, 131070, 0, 1, 196595, 0, 1, 196606, 0, 0, 262131, 536870912, 0, 262142, 0, 1, 327667, 536870912, 0, 327668, 0, 1, 327669, 0, 0, 327670, 0, 1, 327671, 536870912, 0, 327672, 0, 1, 327673, 0, 1, 327674, 0, 0, 327675, 0, 1, 327676, 536870912, 0, 327677, 0, 1, 327678, 536870912, 0 )
|
||||
|
||||
[node name="SpikeTileMap" parent="." instance=ExtResource( 6 )]
|
||||
|
||||
|
|
@ -24,6 +26,9 @@ tile_data = PoolIntArray( -458762, 536870912, 0, -458761, 0, 1, -458760, 0, 0, -
|
|||
z_index = -11
|
||||
tile_data = PoolIntArray( -524295, 536870916, 3, -524294, 536870916, 0, -524293, 536870916, 2, -589821, 536870916, 3, -589820, 536870916, 1, -589819, 536870916, 2, -458766, 5, 2, -458765, -1610612731, 2, -524283, 536870916, 1, -524282, 4, 3, -393230, -1073741819, 0, -393229, -1073741819, 0, -393228, -1073741819, 1, -393227, -1073741819, 1, -393223, 4, 2, -393222, 4, 1, -393221, 4, 3, -393218, 5, 1, -458749, 4, 2, -458747, 4, 0, -458746, 4, 3, -327694, -1073741819, 2, -327693, 1610612741, 2, -327687, 4, 2, -327686, 4, 0, -327685, 4, 3, -327682, 1610612741, 2, -393209, 4, 3, -327678, 5, 2, -327677, 5, 0, -327676, -1610612731, 2, -327675, 4, 2, -327673, 4, 0, -327672, 4, 3, -196614, 1073741829, 2, -196613, 1610612741, 2, -262142, 5, 0, -262141, 5, 0, -262140, 5, 0, -262137, 536870916, 2, -131076, 536870916, 3, -131075, 4, 0, -131074, 536870916, 2, -196606, -1073741819, 2, -196605, 5, 0, -196604, 1610612741, 2, -65540, 536870916, 3, -65539, 4, 1, -65538, 536870916, 2, -131072, 536870916, 3, -131071, 4, 0, -131070, 4, 3, -131069, 5, 1, -11, 1073741829, 2, -10, 5, 0, -9, 1610612741, 2, -65536, 4, 2, -65535, 536870916, 1, -65534, 4, 3, -65533, 5, 1, 131057, 536870916, 3, 131058, 536870916, 0, 131060, 4, 0, 131061, 4, 1, 131062, 4, 3, 131071, -1610612731, 2, 65536, 4, 2, 65537, 4, 0, 65538, 536870916, 2, 65541, 5, 1, 196593, 536870916, 3, 196594, 536870916, 1, 196596, 4, 1, 196597, 4, 0, 196598, 4, 3, 196607, -1610612731, 0, 131077, 5, 1, 262129, 4, 2, 262130, 536870916, 0, 262132, 4, 0, 262133, 4, 1, 262134, 536870916, 2, 262138, 5, 2, 262139, 5, 0, 262140, 5, 0, 262141, 536870917, 2, 262143, -536870907, 2, 196613, 5, 0, 327666, 4, 2 )
|
||||
|
||||
[node name="ObscureMap" parent="." instance=ExtResource( 13 )]
|
||||
tile_data = PoolIntArray( -458766, 1, 0, -458765, 1, 0, -458764, 1, 0, -458763, 1, 0, -393230, 1, 0, -393229, 1, 0, -393228, 1, 0, -393227, 1, 0, -327694, 1, 0, -327693, 1, 0, -327692, 1, 0, -327691, 1, 0, -262158, 0, 0, -262157, 0, 0, -262156, 0, 0, -262155, 0, 0, -196622, 0, 0, -196621, 0, 0, -196620, 0, 0, -196619, 0, 0, -196618, 0, 0, -196617, 0, 0, -196616, 2, 0, -131086, 0, 0, -131085, 0, 0, -131084, 0, 0, -131083, 0, 0, -131082, 0, 0, -131081, 0, 0, -131080, 2, 1 )
|
||||
|
||||
[node name="GameCamera" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( -24, -16 )
|
||||
|
||||
|
|
@ -44,6 +49,9 @@ position = Vector2( 14, -8 )
|
|||
[node name="Box3" parent="Actors" instance=ExtResource( 2 )]
|
||||
position = Vector2( 11, -16 )
|
||||
|
||||
[node name="Note" parent="Actors" instance=ExtResource( 12 )]
|
||||
position = Vector2( -101, -37 )
|
||||
|
||||
[node name="return" type="Sprite" parent="."]
|
||||
position = Vector2( 15, 36 )
|
||||
texture = ExtResource( 10 )
|
||||
|
|
|
|||
|
|
@ -12,9 +12,6 @@ margin_left = 14.0
|
|||
margin_right = 242.0
|
||||
margin_bottom = 128.0
|
||||
color = Color( 1, 0.945098, 0.909804, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Logo" type="Sprite" parent="."]
|
||||
modulate = Color( 0, 0, 0, 1 )
|
||||
|
|
|
|||
9
src/stage/ObscureMap.gd
Normal file
9
src/stage/ObscureMap.gd
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
extends TileMap
|
||||
|
||||
func _ready():
|
||||
tile_set.tile_set_modulate(0, Color.black)
|
||||
tile_set.tile_set_modulate(1, Color.transparent)
|
||||
|
||||
func _physics_process(delta):
|
||||
if is_instance_valid(Shared.player):
|
||||
modulate.a = lerp(modulate.a, 0.0 if get_cellv(world_to_map(Shared.player.center())) != -1 else 1.0, delta * 10.0)
|
||||
66
src/stage/ObscureMap.tscn
Normal file
66
src/stage/ObscureMap.tscn
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://media/image/solid_bricks.png" type="Texture" id=3]
|
||||
[ext_resource path="res://media/image/8pixel.png" type="Texture" id=4]
|
||||
[ext_resource path="res://src/stage/ObscureMap.gd" type="Script" id=5]
|
||||
[ext_resource path="res://media/image/wipe.png" type="Texture" id=6]
|
||||
|
||||
[sub_resource type="TileSet" id=1]
|
||||
0/name = "8pixel.png 0"
|
||||
0/texture = ExtResource( 4 )
|
||||
0/tex_offset = Vector2( 0, 0 )
|
||||
0/modulate = Color( 0, 1, 0.06, 0.33 )
|
||||
0/region = Rect2( 0, 0, 8, 8 )
|
||||
0/tile_mode = 0
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
0/shape_one_way = false
|
||||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
1/name = "wipe.png 1"
|
||||
1/texture = ExtResource( 6 )
|
||||
1/tex_offset = Vector2( 0, 0 )
|
||||
1/modulate = Color( 0, 1, 0, 0.2 )
|
||||
1/region = Rect2( 32, 48, 8, 8 )
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
1/shape_one_way = false
|
||||
1/shape_one_way_margin = 0.0
|
||||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
2/name = "solid_bricks.png 2"
|
||||
2/texture = ExtResource( 3 )
|
||||
2/tex_offset = Vector2( 0, 0 )
|
||||
2/modulate = Color( 1, 1, 1, 1 )
|
||||
2/region = Rect2( 0, 0, 16, 8 )
|
||||
2/tile_mode = 2
|
||||
2/autotile/icon_coordinate = Vector2( 0, 0 )
|
||||
2/autotile/tile_size = Vector2( 8, 8 )
|
||||
2/autotile/spacing = 0
|
||||
2/autotile/occluder_map = [ ]
|
||||
2/autotile/navpoly_map = [ ]
|
||||
2/autotile/priority_map = [ ]
|
||||
2/autotile/z_index_map = [ ]
|
||||
2/occluder_offset = Vector2( 0, 0 )
|
||||
2/navigation_offset = Vector2( 0, 0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
2/shape_one_way = false
|
||||
2/shape_one_way_margin = 0.0
|
||||
2/shapes = [ ]
|
||||
2/z_index = 0
|
||||
|
||||
[node name="ObscureMap" type="TileMap"]
|
||||
light_mask = 4
|
||||
z_index = 12
|
||||
z_as_relative = false
|
||||
tile_set = SubResource( 1 )
|
||||
cell_size = Vector2( 8, 8 )
|
||||
format = 1
|
||||
script = ExtResource( 5 )
|
||||
|
|
@ -2,3 +2,4 @@ extends TileMap
|
|||
|
||||
func _ready():
|
||||
Shared.node_map_solid = self
|
||||
tile_set.tile_set_modulate(1, Color.transparent)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://media/image/8pixel.png" type="Texture" id=1]
|
||||
[ext_resource path="res://media/image/solid_bricks.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="TileSet" id=1]
|
||||
|
|
@ -24,12 +25,27 @@
|
|||
0/shape_one_way_margin = 0.0
|
||||
0/shapes = [ ]
|
||||
0/z_index = 0
|
||||
1/name = "8pixel.png 1"
|
||||
1/texture = ExtResource( 1 )
|
||||
1/tex_offset = Vector2( 0, 0 )
|
||||
1/modulate = Color( 1, 0, 1, 0.33 )
|
||||
1/region = Rect2( 0, 0, 8, 8 )
|
||||
1/tile_mode = 0
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
1/shape_one_way = false
|
||||
1/shape_one_way_margin = 0.0
|
||||
1/shapes = [ ]
|
||||
1/z_index = 0
|
||||
|
||||
[sub_resource type="GDScript" id=2]
|
||||
script/source = "extends TileMap
|
||||
|
||||
func _ready():
|
||||
Shared.node_map_solid = self
|
||||
tile_set.tile_set_modulate(1, Color.transparent)
|
||||
"
|
||||
|
||||
[node name="SolidTileMap" type="TileMap"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue