It's Cow Game! Version 2.04!

This commit is contained in:
PajamaBee 2024-09-19 23:06:51 -05:00
commit a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions

View file

@ -0,0 +1,89 @@
extends NPC
var rng = RandomNumberGenerator.new()
var hopSpeed = 400
var minX = 0
var maxX = 0
var waitTimer = 0
var hopping = false
var kicking = false
var flipChance = false
func _ready():
characterName = "Kid"
pronouns = "she/her"
minX = position.x
maxX = position.x + 150
func _process(delta):
waitTimer -= delta
if waitTimer <= 0:
if $Sprite.animation != "default":
wait_between_actions()
else:
pick_next_action()
if hopping:
if $Sprite.frame >= 1:
position.x += hopSpeed*delta
flipChance = true
else:
if flipChance:
flipChance = false
if rng.randi_range(0, 1) == 1:
hopSpeed = hopSpeed*-1
$Sprite.flip_h = !$Sprite.flip_h
if position.x <= minX and hopSpeed < 0:
hopSpeed = hopSpeed*-1
$Sprite.flip_h = false
elif position.x >= maxX and hopSpeed > 0:
hopSpeed = hopSpeed*-1
$Sprite.flip_h = true
if kicking:
if $Sprite.frame == 0:
flipChance = true
else:
if flipChance:
flipChance = false
if rng.randi_range(0, 1) == 1:
hopSpeed = hopSpeed*-1
$Sprite.flip_h = !$Sprite.flip_h
func wait_between_actions():
hopping = false
waitTimer = rng.randf_range(0.5, 1)
$Sprite.play("default")
func pick_next_action():
hopping = false
kicking = false
var nextActionResult = rng.randi_range(0, 4)
if nextActionResult <= 1:
hop()
elif nextActionResult <= 3:
kick()
elif nextActionResult <= 4:
wait_between_actions()
func kick():
$Sprite.play("Kick")
waitTimer = rng.randi_range(1, 5)
kicking = true
func hop():
$Sprite.play("Prance")
waitTimer = rng.randi_range(2, 4)
hopping = true
if position.x <= minX and hopSpeed < 0:
hopSpeed = hopSpeed*-1
$Sprite.flip_h = false
elif position.x >= maxX and hopSpeed > 0:
hopSpeed = hopSpeed*-1
$Sprite.flip_h = true

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ce8kylpqax5m0"
path="res://.godot/imported/goat3kick2.png-faaf63f3ba80b227f560ce48d296b520.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://NPCs/Arcade/GoatKid3/KickAnim/goat3kick2.png"
dest_files=["res://.godot/imported/goat3kick2.png-faaf63f3ba80b227f560ce48d296b520.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
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=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bttpcdaorhe0l"
path="res://.godot/imported/goat3kick3.png-5a6f7b51737598286199487e31740771.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://NPCs/Arcade/GoatKid3/KickAnim/goat3kick3.png"
dest_files=["res://.godot/imported/goat3kick3.png-5a6f7b51737598286199487e31740771.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
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=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://t7hi3ubhgo3j"
path="res://.godot/imported/goatkid2.png-136c4d072e4073ef38c50abf713a5b75.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://NPCs/Arcade/GoatKid3/KickAnim/goatkid2.png"
dest_files=["res://.godot/imported/goatkid2.png-136c4d072e4073ef38c50abf713a5b75.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
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=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8cucgr3kt3r7"
path="res://.godot/imported/goatkid2prance.png-dda064518875b21f7e26fbd88e00eb15.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://NPCs/Arcade/GoatKid3/PranceAnim/goatkid2prance.png"
dest_files=["res://.godot/imported/goatkid2prance.png-dda064518875b21f7e26fbd88e00eb15.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
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=1

View file

@ -0,0 +1,81 @@
[gd_scene load_steps=11 format=3 uid="uid://c5hw3rt1is5f5"]
[ext_resource type="PackedScene" uid="uid://doqfsp7yxools" path="res://NPCs/NPC.tscn" id="1_gwyxi"]
[ext_resource type="Script" path="res://NPCs/Arcade/GoatKid3/GoatKid3.gd" id="2_sw4iu"]
[ext_resource type="Resource" uid="uid://cq8ckonbneirp" path="res://NPCs/Arcade/GoatKid.dialogue" id="3_3pjim"]
[ext_resource type="Texture2D" uid="uid://c8cucgr3kt3r7" path="res://NPCs/Arcade/GoatKid3/PranceAnim/goatkid2prance.png" id="3_hp52d"]
[ext_resource type="Texture2D" uid="uid://ce8kylpqax5m0" path="res://NPCs/Arcade/GoatKid3/KickAnim/goat3kick2.png" id="4_3g2n6"]
[ext_resource type="Texture2D" uid="uid://t7hi3ubhgo3j" path="res://NPCs/Arcade/GoatKid3/KickAnim/goatkid2.png" id="5_tc1ik"]
[ext_resource type="Texture2D" uid="uid://bttpcdaorhe0l" path="res://NPCs/Arcade/GoatKid3/KickAnim/goat3kick3.png" id="5_ujuc8"]
[sub_resource type="SpriteFrames" id="SpriteFrames_68fp1"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("5_tc1ik")
}, {
"duration": 1.0,
"texture": ExtResource("4_3g2n6")
}, {
"duration": 2.0,
"texture": ExtResource("5_ujuc8")
}, {
"duration": 2.0,
"texture": ExtResource("5_tc1ik")
}],
"loop": true,
"name": &"Kick",
"speed": 6.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("5_tc1ik")
}, {
"duration": 1.0,
"texture": ExtResource("3_hp52d")
}],
"loop": true,
"name": &"Prance",
"speed": 6.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("5_tc1ik")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_im52w"]
radius = 31.4006
[sub_resource type="RectangleShape2D" id="RectangleShape2D_pgnks"]
size = Vector2(71, 7)
[node name="GoatKid3" instance=ExtResource("1_gwyxi")]
script = ExtResource("2_sw4iu")
dialogueResource = ExtResource("3_3pjim")
[node name="Sprite" parent="." index="0"]
position = Vector2(0, -43)
sprite_frames = SubResource("SpriteFrames_68fp1")
frame_progress = 0.758279
[node name="Panel" parent="Interactable" index="1"]
offset_left = -34.0
offset_top = -71.0
offset_right = 44.0
offset_bottom = 3.0
[node name="CollisionShape2D" parent="Talkable/InteractionArea" index="0"]
position = Vector2(7, -30)
shape = SubResource("CircleShape2D_im52w")
[node name="CollisionShape2D" parent="." index="3"]
position = Vector2(-0.5, -1)
shape = SubResource("RectangleShape2D_pgnks")
[editable path="Interactable"]
[editable path="Interactable/ActionMenu"]
[editable path="Talkable"]