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,63 @@
extends NPC
var rng = RandomNumberGenerator.new()
var hopSpeed = -400
var minX = 0
var maxX = 0
var waitTimer = 0
var hopping = false
var flipChance = false
func _ready():
characterName = "Kid"
pronouns = "she/her"
minX = position.x
maxX = position.x + 500
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 = true
elif position.x >= maxX and hopSpeed > 0:
hopSpeed = hopSpeed*-1
$Sprite.flip_h = false
func wait_between_actions():
hopping = false
waitTimer = rng.randf_range(0.5, 1)
$Sprite.play("default")
func pick_next_action():
hopping = false
var nextActionResult = rng.randi_range(0, 4)
if nextActionResult <= 3:
hop()
elif nextActionResult <= 4:
wait_between_actions()
func hop():
$Sprite.play("Prance")
waitTimer = rng.randi_range(2, 4)
hopping = true

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ctse0jcb6rfq8"
path="res://.godot/imported/goat2rec1.png-3b9405be853748d7c6826d692e2468c5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://NPCs/Arcade/GoatKid2/PranceAnim/goat2rec1.png"
dest_files=["res://.godot/imported/goat2rec1.png-3b9405be853748d7c6826d692e2468c5.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: 689 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ce61spfcpd5ee"
path="res://.godot/imported/goat2rec2.png-fcd9949809678cb37590f60828a049ac.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://NPCs/Arcade/GoatKid2/PranceAnim/goat2rec2.png"
dest_files=["res://.godot/imported/goat2rec2.png-fcd9949809678cb37590f60828a049ac.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,61 @@
[gd_scene load_steps=9 format=3 uid="uid://ocl31dhmccr8"]
[ext_resource type="PackedScene" uid="uid://doqfsp7yxools" path="res://NPCs/NPC.tscn" id="1_36jri"]
[ext_resource type="Script" path="res://NPCs/Arcade/GoatKid2/GoatKid2.gd" id="2_ugi2u"]
[ext_resource type="Resource" uid="uid://cq8ckonbneirp" path="res://NPCs/Arcade/GoatKid.dialogue" id="3_kfihi"]
[ext_resource type="Texture2D" uid="uid://ctse0jcb6rfq8" path="res://NPCs/Arcade/GoatKid2/PranceAnim/goat2rec1.png" id="3_xb0oq"]
[ext_resource type="Texture2D" uid="uid://ce61spfcpd5ee" path="res://NPCs/Arcade/GoatKid2/PranceAnim/goat2rec2.png" id="4_lqho8"]
[sub_resource type="SpriteFrames" id="SpriteFrames_6c4d6"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_xb0oq")
}, {
"duration": 1.0,
"texture": ExtResource("4_lqho8")
}],
"loop": true,
"name": &"Prance",
"speed": 6.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_xb0oq")
}],
"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(60, 7)
[node name="GoatKid2" instance=ExtResource("1_36jri")]
script = ExtResource("2_ugi2u")
dialogueResource = ExtResource("3_kfihi")
[node name="Sprite" parent="." index="0"]
position = Vector2(0, -37)
sprite_frames = SubResource("SpriteFrames_6c4d6")
[node name="Panel" parent="Interactable" index="1"]
offset_left = -41.0
offset_top = -68.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(10, -2.5)
shape = SubResource("RectangleShape2D_pgnks")
[editable path="Interactable"]
[editable path="Interactable/ActionMenu"]
[editable path="Talkable"]