Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
unfa committed Jan 22, 2021
2 parents 1e1ffe8 + 66fba11 commit 59c8fd0
Show file tree
Hide file tree
Showing 174 changed files with 65,703 additions and 1,092 deletions.
3 changes: 3 additions & 0 deletions .import/Tiles 08.dae-69c0271f5af291186408344fe28ad3d1.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="2a6c9d94031c018bbbc2612224009a5a"
dest_md5="13bb71e9ac6fcdafcb897b9d70d06c53"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/Tiles 08.gltf-bcfd65a5480642e4312f8cd76607ce9e.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="95fafa3d6d27c7de35c770257250205b"
dest_md5="b924c1e3aa3a108d10fba6d2044e077c"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/Tiles 09.gltf-eb0e042d49e2bd872a2bf2f41aea8ef8.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="d94e5ffcc9a42bb6e3b0849a8f9ae40e"
dest_md5="416b08340cb5af6adccd976152c4aaf0"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/Tiles 10.dae-6776c471cd43ef94893e9180b263f563.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="7f7a18b75bd0427b7787c7e351eda36e"
dest_md5="6e19e43da87f42a0fa6533f9197e78cc"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/Tiles 10.gltf-502cd82c007c90332e60aa1025027390.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="8564d857be1fe69e9ecebdefaa4ddec5"
dest_md5="031ccedd8baef0c052a936b7307c32cd"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/Tiles 11.dae-950dfb821a2625076d4eefbb85fc6da3.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="10c6cfb4a894b3d87b7b5bef8a8c878c"
dest_md5="ac9f4164f347bc112eea8dd94d5d753c"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/Tiles 11.gltf-412bc50afc79737232ca13d067852f16.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="744efaa71345aedfeb48d4b49fa6ed1b"
dest_md5="ecf293deeb314e43eae5b90dc01c4d5f"

Binary file not shown.
12 changes: 11 additions & 1 deletion Assets/Brie Enemy/Brie.gd
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var futile_motion = false


onready var AttackParticles = $Brie/Armature/Skeleton/Attack/Particles2
onready var WindupParticles = $Brie/Armature/Skeleton/Attack/WindupParticles
onready var AttackCollider = $Brie/Armature/Skeleton/Attack/Collider
const ATTACK_WINDUP = 0.75
const ATTACK_DURATION = 1.25
Expand Down Expand Up @@ -93,6 +94,7 @@ func attack(delta):
attack_connected = false
MovementState.set_current_state("Stand")
anim.play("Attack")
WindupParticles.emitting = true

yield(get_tree().create_timer(ATTACK_WINDUP),"timeout")

Expand Down Expand Up @@ -338,5 +340,13 @@ func _on_Attack_body_exited(body):
func _on_Collider_body_entered(body):
if body.is_in_group("players"):
if not attack_connected: #this is the first time we're dealing damage for this attack
body.damage(10)
body.damage(25)
attack_connected = true

func activate():
set_physics_process(true)
show()

func deactivate():
set_physics_process(false)
hide()
49 changes: 43 additions & 6 deletions Assets/Brie Enemy/Brie.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=24 format=2]
[gd_scene load_steps=25 format=2]

[ext_resource path="res://Assets/Brie Enemy/Brie.gltf" type="PackedScene" id=1]
[ext_resource path="res://Assets/Brie Enemy/Attack/Cheese Puke Particles 01.svg" type="Texture" id=2]
Expand All @@ -24,13 +24,13 @@ animation = "Walk -loop"
"states/Alert -loop/node" = SubResource( 1 )
"states/Alert -loop/position" = Vector2( 274, 98 )
states/Attack/node = SubResource( 2 )
states/Attack/position = Vector2( 716, 92 )
states/Attack/position = Vector2( 739, 119 )
states/Die/node = SubResource( 3 )
states/Die/position = Vector2( 556, 159 )
"states/Idle -loop/node" = SubResource( 4 )
"states/Idle -loop/position" = Vector2( 670, 210 )
"states/Idle -loop/position" = Vector2( 722, 245 )
"states/Walk -loop/node" = SubResource( 5 )
"states/Walk -loop/position" = Vector2( 279, 181 )
"states/Walk -loop/position" = Vector2( 224, 200 )

[sub_resource type="AnimationNodeStateMachinePlayback" id=7]

Expand Down Expand Up @@ -91,12 +91,31 @@ color_ramp = SubResource( 16 )
anim_offset = 1.0
anim_offset_random = 1.0

[sub_resource type="CapsuleShape" id=19]
[sub_resource type="ParticlesMaterial" id=19]
lifetime_randomness = 0.5
emission_shape = 1
emission_sphere_radius = 3.01
direction = Vector3( 0, 0, 0 )
spread = 5.0
gravity = Vector3( 0, 0, 0 )
radial_accel = -100.0
damping = 30.0
damping_random = 0.25
angle = 720.0
angle_random = 1.0
scale_random = 0.25
scale_curve = SubResource( 17 )
color_ramp = SubResource( 16 )
anim_offset = 1.0
anim_offset_random = 1.0

[sub_resource type="CapsuleShape" id=20]
radius = 0.75397
height = 0.212272

[node name="Brie" type="KinematicBody" groups=[
"enemies",
"managed",
]]
script = ExtResource( 4 )

Expand Down Expand Up @@ -181,6 +200,12 @@ shape = SubResource( 10 )
[node name="Brie" parent="." instance=ExtResource( 1 )]
transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0, 0, 0 )

[node name="Skeleton" parent="Brie/Armature" index="0"]
bones/2/bound_children = [ NodePath("Attack") ]

[node name="Brie" parent="Brie/Armature/Skeleton" index="0"]
layers = 2

[node name="Attack" type="BoneAttachment" parent="Brie/Armature/Skeleton" index="1"]
transform = Transform( 1, 0, -5.90522e-20, 0, 1, -1.67836e-33, 5.90522e-20, 1.67836e-33, 1, -9.4879e-15, 0.786849, 2.29589e-41 )
bone_name = "upper_body"
Expand Down Expand Up @@ -231,10 +256,22 @@ local_coords = false
process_material = SubResource( 18 )
draw_pass_1 = SubResource( 13 )

[node name="WindupParticles" type="Particles" parent="Brie/Armature/Skeleton/Attack"]
transform = Transform( -1, 0, 3.25841e-07, -5.46881e-40, 1, -1.67836e-33, -3.25841e-07, -1.67836e-33, -1, -1.16747e-07, -0.0314221, 0.358294 )
emitting = false
amount = 16
lifetime = 0.3
one_shot = true
randomness = 0.48
visibility_aabb = AABB( -1.06367, -1.21051, -3.80052, 2.12734, 1.77062, 4.12546 )
local_coords = false
process_material = SubResource( 19 )
draw_pass_1 = SubResource( 13 )

[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0.84164, 0 )
visible = false
shape = SubResource( 19 )
shape = SubResource( 20 )
[connection signal="timeout" from="AI/WanderIdle" to="." method="_on_WanderIdle_timeout"]
[connection signal="body_entered" from="AI/Attack" to="." method="_on_Attack_body_entered"]
[connection signal="body_exited" from="AI/Attack" to="." method="_on_Attack_body_exited"]
Expand Down
22 changes: 17 additions & 5 deletions Camera.gd → Assets/Camera/CameraRig.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ onready var player = get_tree().get_nodes_in_group("players")[0]
onready var debug = $Debug/Label


const translation_offset = Vector3(0, 10, 10)
const translation_offset = Vector3(0, 5, 8)
const lookat_offset = Vector3(0, 0, -10)
const player_origin_offset = Vector3(0, 4, 0)

Expand All @@ -22,10 +22,25 @@ var player_occluded = false

var player_moved = false

# snapping

var snapped = false
var snap_transform = Transform.IDENTITY

func snap(enable: bool, transform: Transform = Transform.IDENTITY):
print("CAMERA SNAP ", enable)
if enable:
snapped = true
snap_transform = transform
else:
snapped = false
#snap_transform = Transform.IDENTITY

func _ready():
print("Camera initiated")

func _physics_process(delta):

debug.text = "CAMERA DEBUG\n\n"

player_loc = player.global_transform.origin
Expand Down Expand Up @@ -65,11 +80,8 @@ func _physics_process(delta):

#lookat_target = lookat_target.interpolate_with(player.global_transform.translated(lookat_offset), 0.01)

# project the camera location startin at the player location to the target location to make sure the player is not occluded
move_and_collide(temp_transform.origin - global_transform.origin)



# look_at the player applying an offset
camera.look_at(lookat_target, Vector3.UP)

# global_transform = temp_transform.interpolate_with(temp_transform.looking_at(player.global_transform.translated(lookat_offset).origin, Vector3.UP), lookat_time * delta)
17 changes: 11 additions & 6 deletions Assets/Camera/CameraRig.tscn
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[gd_scene load_steps=5 format=2]

[ext_resource path="res://Camera.gd" type="Script" id=1]
[ext_resource path="res://Assets/Camera/CameraRig.gd" type="Script" id=1]
[ext_resource path="res://Tools/Debug.tscn" type="PackedScene" id=2]

[sub_resource type="ShaderMaterial" id=1]
resource_local_to_scene = true

[sub_resource type="SphereShape" id=2]
radius = 0.5
radius = 0.25

[node name="CameraBody" type="KinematicBody" groups=[
"camera_bodies",
]]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 63.3397, 53.5453 )
transform = Transform( 1, 0, 0, 0, 0.999936, -0.0112746, 0, 0.0112746, 0.999936, 0, 63.3397, 53.5453 )
input_ray_pickable = false
script = ExtResource( 1 )

Expand All @@ -22,12 +22,17 @@ grow_horizontal = 0
grow_vertical = 0

[node name="Label" parent="Debug" index="0"]
visible = false
margin_left = 29.0
margin_top = 173.0
margin_right = -35.72
margin_bottom = 109.0

[node name="Camera" type="Camera" parent="."]
[node name="Camera" type="Camera" parent="." groups=[
"camera",
]]
current = true
fov = 80.0
far = 200.0
far = 400.0

[node name="CollisionShape" type="CollisionShape" parent="."]
shape = SubResource( 2 )
Expand Down
7 changes: 7 additions & 0 deletions Assets/Checkpoint/Checkpoint.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func _ready():
# particles.draw_pass_1.surface_set_material(0, particles.draw_pass_1.surface_get_material(0).duplicate() )
# print(particles.draw_pass_1.surface_get_material(0))

# play the first frame of the animation, making sure the shaders are in proper state
anim.play("Activate")
anim.stop(true)

Expand All @@ -46,3 +47,9 @@ func _on_Checkpoint_body_entered(body):
i.recent = false

#print (self.name, " is now an active checkpoint")

func activate():
$Particles.emitting = true

func deactivate():
$Particles.emitting = false
4 changes: 3 additions & 1 deletion Assets/Checkpoint/Checkpoint.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ tracks/1/keys = {
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.32669, 0 )
script = ExtResource( 1 )

[node name="MeshInstance" type="MeshInstance" parent="."]
[node name="MeshInstance" type="MeshInstance" parent="." groups=[
"managed",
]]
material_override = ExtResource( 2 )
cast_shadow = 0
mesh = SubResource( 1 )
Expand Down
13 changes: 7 additions & 6 deletions Assets/Checkpoint/CheckpointShader.tres
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ void fragment() {

// Output:0
ALBEDO = n_out64p0;
ALPHA = dot(n_out64p0, vec3(0.333333, 0.333333, 0.333333));

}

Expand All @@ -226,7 +227,7 @@ void light() {

}
"
graph_offset = Vector2( 803.453, -401 )
graph_offset = Vector2( 1005, -575.75 )
modes/cull = 2
modes/depth_draw = 3
modes/specular = 4
Expand All @@ -252,9 +253,9 @@ nodes/fragment/18/position = Vector2( -1260, -540 )
nodes/fragment/19/node = SubResource( 8 )
nodes/fragment/19/position = Vector2( 280, -660 )
nodes/fragment/31/node = SubResource( 9 )
nodes/fragment/31/position = Vector2( 920, -420 )
nodes/fragment/31/position = Vector2( 880, -440 )
nodes/fragment/34/node = SubResource( 10 )
nodes/fragment/34/position = Vector2( 580, -340 )
nodes/fragment/34/position = Vector2( 440, -460 )
nodes/fragment/35/node = SubResource( 11 )
nodes/fragment/35/position = Vector2( -20, -600 )
nodes/fragment/36/node = SubResource( 12 )
Expand All @@ -272,11 +273,11 @@ nodes/fragment/56/position = Vector2( -460, -580 )
nodes/fragment/61/node = SubResource( 21 )
nodes/fragment/61/position = Vector2( 1240, -160 )
nodes/fragment/62/node = SubResource( 22 )
nodes/fragment/62/position = Vector2( 1200, -340 )
nodes/fragment/62/position = Vector2( 1120, -340 )
nodes/fragment/63/node = SubResource( 23 )
nodes/fragment/63/position = Vector2( 1540, -400 )
nodes/fragment/64/node = SubResource( 24 )
nodes/fragment/64/position = Vector2( 2020, -400 )
nodes/fragment/64/position = Vector2( 2000, -340 )
nodes/fragment/65/node = SubResource( 25 )
nodes/fragment/65/position = Vector2( 1480, -160 )
nodes/fragment/66/node = SubResource( 26 )
Expand All @@ -285,4 +286,4 @@ nodes/fragment/67/node = SubResource( 27 )
nodes/fragment/67/position = Vector2( 1820, -220 )
nodes/fragment/68/node = SubResource( 28 )
nodes/fragment/68/position = Vector2( 1600, -300 )
nodes/fragment/connections = PoolIntArray( 18, 0, 17, 1, 34, 0, 31, 0, 35, 0, 19, 0, 17, 0, 12, 0, 9, 0, 34, 0, 14, 0, 17, 0, 16, 0, 18, 0, 38, 0, 19, 1, 16, 0, 54, 0, 14, 0, 55, 0, 54, 0, 55, 1, 55, 0, 53, 0, 12, 0, 56, 0, 53, 0, 56, 1, 7, 0, 38, 3, 5, 0, 61, 0, 5, 1, 61, 1, 31, 0, 62, 0, 5, 0, 62, 1, 5, 1, 63, 2, 31, 0, 63, 0, 62, 0, 63, 1, 63, 0, 64, 0, 64, 0, 0, 0, 61, 0, 65, 0, 66, 0, 65, 1, 65, 0, 67, 1, 67, 0, 64, 1, 19, 0, 34, 1, 36, 0, 35, 1, 56, 0, 35, 0, 38, 0, 68, 0, 68, 0, 67, 0 )
nodes/fragment/connections = PoolIntArray( 18, 0, 17, 1, 35, 0, 19, 0, 17, 0, 12, 0, 9, 0, 34, 0, 14, 0, 17, 0, 16, 0, 18, 0, 38, 0, 19, 1, 16, 0, 54, 0, 14, 0, 55, 0, 54, 0, 55, 1, 55, 0, 53, 0, 12, 0, 56, 0, 53, 0, 56, 1, 7, 0, 38, 3, 5, 0, 61, 0, 5, 1, 61, 1, 31, 0, 62, 0, 5, 0, 62, 1, 5, 1, 63, 2, 31, 0, 63, 0, 62, 0, 63, 1, 63, 0, 64, 0, 61, 0, 65, 0, 66, 0, 65, 1, 65, 0, 67, 1, 67, 0, 64, 1, 19, 0, 34, 1, 36, 0, 35, 1, 56, 0, 35, 0, 38, 0, 68, 0, 68, 0, 67, 0, 34, 0, 31, 0, 64, 0, 0, 0, 64, 0, 0, 1 )
5 changes: 3 additions & 2 deletions Assets/Effects/EffectStarPickup.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ extends Spatial

# Called when the node enters the scene tree for the first time.
func _ready():
$StarParticles.emitting = true
$SmokeParticles.emitting = true
#yield(get_tree().create_timer(0.1), "timeout")
$StarParticles2.emitting = true
$SmokeParticles2.emitting = true
yield(get_tree().create_timer(8),"timeout")
queue_free()

Expand Down
Loading

0 comments on commit 59c8fd0

Please sign in to comment.