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

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b2fb28jycsca2"
path="res://.godot/imported/Arrow.png-98d76b648a05494f8f337c720f5a78d9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/Faire/Wheel/Arrow.png"
dest_files=["res://.godot/imported/Arrow.png-98d76b648a05494f8f337c720f5a78d9.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,65 @@
extends Node2D
var spinning = false
var maxLaunchSpeed = 1300
var minLaunchSpeed = 600
var spinSpeed = 0
var acceleration = -100
var rng = RandomNumberGenerator.new()
var prizes = []
var ticketItem = load("res://Items/Paper/FaireTicket.gd")
func _ready():
initialize_prizes()
func _process(delta):
if spinning:
%SpinningWheel.rotation_degrees += spinSpeed * delta
spinSpeed += acceleration * delta
while %SpinningWheel.rotation_degrees >= 360:
%SpinningWheel.rotation_degrees -= 360
if spinSpeed <= 0:
spinning = false
give_prize()
func give_prize():
var prize = prizes[floor(%SpinningWheel.rotation_degrees/30)]
if prize != null:
var newPrize = prize.new()
InventoryManager.add_item_to_inventory(newPrize)
LevelManager.add_XP("gaming", newPrize.get_value())
MessageManager.item_popup(prize.new())
func spin():
if !spinning:
if InventoryManager.spend_item(ticketItem.new(), 2):
spinning = true
spinSpeed = rng.randf_range(minLaunchSpeed, maxLaunchSpeed)
LevelManager.add_XP("gaming", 5)
else:
MessageManager.addMessage("You need two faire tickets to spin the wheel.", null, "System", Color.MIDNIGHT_BLUE,
true, false)
func initialize_prizes():
prizes.append(load("res://Items/Foods/Fruits/Watermelon.gd"))
prizes.append(load("res://Items/Foods/Snack/Lollipop.gd"))
prizes.append(null)
prizes.append(load("res://Items/Toys/Instruments/Trumpet.gd"))
prizes.append(null)
prizes.append(load("res://Items/Paper/FaireTicket.gd"))
prizes.append(load("res://Items/Toys/Puppets/MarlowPuppet.gd"))
prizes.append(null)
prizes.append(load("res://Items/Foods/Snack/OnionRing.gd"))
prizes.append(load("res://Items/Foods/Meal/Burrito.gd"))
prizes.append(null)
prizes.append(load("res://Items/Foods/Snack/Churro.gd"))

View file

@ -0,0 +1,74 @@
[gd_scene load_steps=10 format=3 uid="uid://bg43t2vpwifyp"]
[ext_resource type="PackedScene" uid="uid://cujx1a8vwxsj8" path="res://Objects/world_object.tscn" id="1_vyqj2"]
[ext_resource type="Script" path="res://Objects/Faire/Wheel/Wheel.gd" id="2_b80ij"]
[ext_resource type="Texture2D" uid="uid://cey4tpqb2upc" path="res://Objects/Faire/Wheel/wheel.png" id="2_lveek"]
[ext_resource type="Texture2D" uid="uid://l4kxqeqiba10" path="res://Objects/Faire/Wheel/wheelBase.png" id="3_nnqgb"]
[ext_resource type="Texture2D" uid="uid://b2fb28jycsca2" path="res://Objects/Faire/Wheel/Arrow.png" id="4_jumjg"]
[ext_resource type="PackedScene" uid="uid://1syjvoev4qjn" path="res://Interactions/Spinable/Spinable.tscn" id="5_vkay4"]
[ext_resource type="PackedScene" uid="uid://bqibe7ha6r5ls" path="res://Interactions/Interactable/interactable.tscn" id="6_nm03e"]
[sub_resource type="SpriteFrames" id="SpriteFrames_3whw7"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_lveek")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_tdnm8"]
radius = 61.0
[node name="Wheel" instance=ExtResource("1_vyqj2")]
y_sort_enabled = true
script = ExtResource("2_b80ij")
[node name="AnimatedSprite2D" parent="." index="0"]
visible = false
sprite_frames = SubResource("SpriteFrames_3whw7")
offset = Vector2(0, -100)
[node name="StaticBody2D2" type="StaticBody2D" parent="." index="1"]
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D2" index="0"]
position = Vector2(152, 3)
polygon = PackedVector2Array(24, 52, 25, 58, 11, 57, 10, 52)
[node name="CollisionPolygon2D" parent="StaticBody2D" index="0"]
polygon = PackedVector2Array(-79, 29, -110, 0, 111, 0, 78, 31, 88, 48, 115, 56, 114, 63, -111, 63, -108, 54, -84, 46)
[node name="WheelBase" type="Sprite2D" parent="." index="3"]
position = Vector2(2, 46)
texture = ExtResource("3_nnqgb")
[node name="Wheel" type="Node2D" parent="." index="4"]
[node name="SpinningWheel" type="Sprite2D" parent="Wheel" index="0"]
unique_name_in_owner = true
position = Vector2(0, -100)
texture = ExtResource("2_lveek")
[node name="Arrow" type="Sprite2D" parent="." index="5"]
position = Vector2(159, 56)
texture = ExtResource("4_jumjg")
offset = Vector2(0, -85)
[node name="Spinable" parent="." index="6" instance=ExtResource("5_vkay4")]
[node name="CollisionShape2D" parent="Spinable/InteractionArea" index="0"]
shape = SubResource("CircleShape2D_tdnm8")
[node name="Interactable" parent="." index="7" instance=ExtResource("6_nm03e")]
[node name="Panel" parent="Interactable" index="1"]
offset_left = -113.0
offset_top = -167.0
offset_right = 111.0
offset_bottom = 63.0
[editable path="Spinable"]
[editable path="Interactable"]
[editable path="Interactable/ActionMenu"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cey4tpqb2upc"
path="res://.godot/imported/wheel.png-2a68513f036384404c26f687750e403d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/Faire/Wheel/wheel.png"
dest_files=["res://.godot/imported/wheel.png-2a68513f036384404c26f687750e403d.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: 500 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://l4kxqeqiba10"
path="res://.godot/imported/wheelBase.png-151b11eb2bcdbbce8da16287ce73ebbe.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Objects/Faire/Wheel/wheelBase.png"
dest_files=["res://.godot/imported/wheelBase.png-151b11eb2bcdbbce8da16287ce73ebbe.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