Skip to content

Commit

Permalink
Bulk changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
unfa committed Jan 22, 2021
1 parent 616214f commit 66fba11
Show file tree
Hide file tree
Showing 93 changed files with 15,130 additions and 348 deletions.
4 changes: 3 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,7 +340,7 @@ 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():
Expand Down
48 changes: 42 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,7 +91,25 @@ 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

Expand Down Expand Up @@ -182,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 @@ -232,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
20 changes: 16 additions & 4 deletions Assets/Camera/CameraRig.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
13 changes: 9 additions & 4 deletions Assets/Camera/CameraRig.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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
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 66fba11

Please sign in to comment.