Skip to content

Commit

Permalink
Add Barn Glow and Reimport images
Browse files Browse the repository at this point in the history
  • Loading branch information
caldane committed Jan 11, 2023
1 parent d0f8bc1 commit 82d191a
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 1 deletion.
Binary file added poofarmer/Images/FarmHouseGlow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions poofarmer/Images/FarmHouseGlow.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/FarmHouseGlow.png-3122da9ffd95f41c0d2ad58f779dd7f4.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Images/FarmHouseGlow.png"
dest_files=[ "res://.import/FarmHouseGlow.png-3122da9ffd95f41c0d2ad58f779dd7f4.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
1 change: 1 addition & 0 deletions poofarmer/Scenes/Goblin.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ script = ExtResource( 1 )
scale = Vector2( 1.5, 1.5 )
frames = SubResource( 17 )
animation = "down"
frame = 1
playing = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
Expand Down
9 changes: 8 additions & 1 deletion poofarmer/Scenes/Silo.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=2]
[gd_scene load_steps=16 format=2]

[ext_resource path="res://Scripts/Silo.gd" type="Script" id=1]
[ext_resource path="res://Images/FarmHouse.png" type="Texture" id=2]
Expand All @@ -7,6 +7,7 @@
[ext_resource path="res://Images/SiloTop.Png" type="Texture" id=5]
[ext_resource path="res://Images/FarmHouseOpen.png" type="Texture" id=6]
[ext_resource path="res://Images/Crap.png" type="Texture" id=7]
[ext_resource path="res://Images/FarmHouseGlow.png" type="Texture" id=8]

[sub_resource type="SpriteFrames" id=7]
animations = [ {
Expand Down Expand Up @@ -64,6 +65,12 @@ collision_layer = 4
collision_mask = 11
script = ExtResource( 1 )

[node name="Glow" type="Sprite" parent="."]
visible = false
position = Vector2( -24, -32 )
scale = Vector2( 1.53125, 1.58929 )
texture = ExtResource( 8 )

[node name="Node" type="Node2D" parent="."]

[node name="Poo" type="AnimatedSprite" parent="Node"]
Expand Down
2 changes: 2 additions & 0 deletions poofarmer/Scripts/Goblin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
var velocity = Vector2()
if position.distance_to(silo.position) <= 300:
currentPooTargets.clear()
if playerNearby && playerHasPoo && !isFleeing:
velocity = move_at_body(player, delta)
elif currentPooTargets.size() > 0 && poosPickedUp <= pooCapacity:
Expand Down
3 changes: 3 additions & 0 deletions poofarmer/Scripts/Silo.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ extends Area2D

onready var player = get_tree().get_nodes_in_group("player")[0]
onready var barn_sprite = $BarnSprite
onready var glow = $Glow

func _physics_process(delta):
if overlaps_body(player):
glow.visible = true
barn_sprite.animation = "open-doors"
print("player in dump range")

if Input.is_action_pressed("ui_select"):
(player as Player).dump_poo_in_silo()
else:
glow.visible = false
barn_sprite.animation = "closed-doors"

0 comments on commit 82d191a

Please sign in to comment.