It's Cow Game! Version 2.04!
This commit is contained in:
commit
a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions
6
Objects/GroundItems/EmptyKeyPacketGroundItem.gd
Normal file
6
Objects/GroundItems/EmptyKeyPacketGroundItem.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends GroundItem
|
||||
|
||||
func _ready():
|
||||
super._ready()
|
||||
if not SaveManager.get_save_value("refillQuestStarted", false):
|
||||
queue_free()
|
||||
66
Objects/GroundItems/GroB1B7.tmp
Normal file
66
Objects/GroundItems/GroB1B7.tmp
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://dhk768odtfjjc"]
|
||||
|
||||
[ext_resource type="Script" path="res://Objects/GroundItems/GroundItem.gd" id="1_fllcp"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbmlkil40xcbc" path="res://MiscArt/WhiteCircle.png" id="2_5slim"]
|
||||
[ext_resource type="PackedScene" uid="uid://bqibe7ha6r5ls" path="res://Interactions/Interactable/interactable.tscn" id="2_phgrr"]
|
||||
[ext_resource type="PackedScene" uid="uid://twerpkipa0v8" path="res://Interactions/Arson/arsonable.tscn" id="3_7pt01"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt2n0yqtg4rdu" path="res://Interactions/Pickupable/Pickupable.tscn" id="4_13rpv"]
|
||||
[ext_resource type="PackedScene" uid="uid://dxru24e0y16p2" path="res://Interactions/Weavable/Weavable.tscn" id="6_utry8"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_4d7js"]
|
||||
radius = 73.0616
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_m1jwd"]
|
||||
radius = 23.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_3gdtd"]
|
||||
radius = 60.0
|
||||
|
||||
[node name="GroundItem" type="Node2D"]
|
||||
z_as_relative = false
|
||||
script = ExtResource("1_fllcp")
|
||||
|
||||
[node name="WhiteCircle" type="Sprite2D" parent="."]
|
||||
self_modulate = Color(0.580392, 1, 1, 0.317647)
|
||||
show_behind_parent = true
|
||||
position = Vector2(0, 2)
|
||||
scale = Vector2(0.783333, 0.366667)
|
||||
texture = ExtResource("2_5slim")
|
||||
|
||||
[node name="ItemSprite" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="Interactable" parent="." instance=ExtResource("2_phgrr")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="Panel" parent="Interactable" index="1"]
|
||||
offset_left = -27.0
|
||||
offset_top = -26.0
|
||||
offset_right = 27.0
|
||||
offset_bottom = 26.0
|
||||
|
||||
[node name="Arsonable" parent="." instance=ExtResource("3_7pt01")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="CollisionShape2D" parent="Arsonable/InteractionArea" index="0"]
|
||||
shape = SubResource("CircleShape2D_4d7js")
|
||||
|
||||
[node name="Pickupable" parent="." instance=ExtResource("4_13rpv")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="CollisionShape2D" parent="Pickupable/InteractionArea" index="0"]
|
||||
position = Vector2(0, -10)
|
||||
shape = SubResource("CircleShape2D_m1jwd")
|
||||
|
||||
[node name="Weavable" parent="." instance=ExtResource("6_utry8")]
|
||||
position = Vector2(0, -3)
|
||||
|
||||
[node name="CollisionShape2D" parent="Weavable/InteractionArea" index="0"]
|
||||
position = Vector2(0, -9)
|
||||
shape = SubResource("CircleShape2D_3gdtd")
|
||||
|
||||
[editable path="Interactable"]
|
||||
[editable path="Interactable/ActionMenu"]
|
||||
[editable path="Arsonable"]
|
||||
[editable path="Pickupable"]
|
||||
[editable path="Weavable"]
|
||||
66
Objects/GroundItems/GroC58C.tmp
Normal file
66
Objects/GroundItems/GroC58C.tmp
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://dhk768odtfjjc"]
|
||||
|
||||
[ext_resource type="Script" path="res://Objects/GroundItems/GroundItem.gd" id="1_fllcp"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbmlkil40xcbc" path="res://MiscArt/WhiteCircle.png" id="2_5slim"]
|
||||
[ext_resource type="PackedScene" uid="uid://bqibe7ha6r5ls" path="res://Interactions/Interactable/interactable.tscn" id="2_phgrr"]
|
||||
[ext_resource type="PackedScene" uid="uid://twerpkipa0v8" path="res://Interactions/Arson/arsonable.tscn" id="3_7pt01"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt2n0yqtg4rdu" path="res://Interactions/Pickupable/Pickupable.tscn" id="4_13rpv"]
|
||||
[ext_resource type="PackedScene" uid="uid://dxru24e0y16p2" path="res://Interactions/Weavable/Weavable.tscn" id="6_utry8"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_4d7js"]
|
||||
radius = 73.0616
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_m1jwd"]
|
||||
radius = 23.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_3gdtd"]
|
||||
radius = 60.0
|
||||
|
||||
[node name="GroundItem" type="Node2D"]
|
||||
z_as_relative = false
|
||||
script = ExtResource("1_fllcp")
|
||||
|
||||
[node name="WhiteCircle" type="Sprite2D" parent="."]
|
||||
self_modulate = Color(0.580392, 1, 1, 0.317647)
|
||||
show_behind_parent = true
|
||||
position = Vector2(0, 2)
|
||||
scale = Vector2(0.783333, 0.366667)
|
||||
texture = ExtResource("2_5slim")
|
||||
|
||||
[node name="ItemSprite" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="Interactable" parent="." instance=ExtResource("2_phgrr")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="Panel" parent="Interactable" index="1"]
|
||||
offset_left = -27.0
|
||||
offset_top = -26.0
|
||||
offset_right = 27.0
|
||||
offset_bottom = 26.0
|
||||
|
||||
[node name="Arsonable" parent="." instance=ExtResource("3_7pt01")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="CollisionShape2D" parent="Arsonable/InteractionArea" index="0"]
|
||||
shape = SubResource("CircleShape2D_4d7js")
|
||||
|
||||
[node name="Pickupable" parent="." instance=ExtResource("4_13rpv")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="CollisionShape2D" parent="Pickupable/InteractionArea" index="0"]
|
||||
position = Vector2(0, -10)
|
||||
shape = SubResource("CircleShape2D_m1jwd")
|
||||
|
||||
[node name="Weavable" parent="." instance=ExtResource("6_utry8")]
|
||||
position = Vector2(0, -3)
|
||||
|
||||
[node name="CollisionShape2D" parent="Weavable/InteractionArea" index="0"]
|
||||
position = Vector2(0, -9)
|
||||
shape = SubResource("CircleShape2D_3gdtd")
|
||||
|
||||
[editable path="Interactable"]
|
||||
[editable path="Interactable/ActionMenu"]
|
||||
[editable path="Arsonable"]
|
||||
[editable path="Pickupable"]
|
||||
[editable path="Weavable"]
|
||||
119
Objects/GroundItems/GroundItem.gd
Normal file
119
Objects/GroundItems/GroundItem.gd
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
extends Node2D
|
||||
|
||||
class_name GroundItem
|
||||
|
||||
@export var itemClass:Resource
|
||||
@export var keyItem:bool = false
|
||||
var item:Item
|
||||
|
||||
var interactingTerrains = []
|
||||
|
||||
var inWater = false
|
||||
var sinking = false
|
||||
var sinkingSpeed = 0.35
|
||||
var bobbingDelay = 0.8
|
||||
|
||||
var noTerrainCheckDelay = 0
|
||||
|
||||
var visibleDelay = 0.05
|
||||
|
||||
func _ready():
|
||||
visible = false
|
||||
if itemClass != null:
|
||||
set_item(itemClass.new())
|
||||
|
||||
func assume_water_start(water):
|
||||
$Waves.visible = true
|
||||
$Waves.self_modulate = water.liquidColor
|
||||
$WhiteCircle.visible = false
|
||||
|
||||
if water.viscosity < item.get_hardness():
|
||||
$Waves.visible = false
|
||||
|
||||
noTerrainCheckDelay = 0.5
|
||||
|
||||
func set_item(newItem:Item):
|
||||
item = newItem
|
||||
$ItemSprite.texture = item.get_sprite()
|
||||
|
||||
func _process(delta):
|
||||
if visibleDelay > 0:
|
||||
visibleDelay -= delta
|
||||
if visibleDelay <= 0:
|
||||
visible = true
|
||||
|
||||
if "Balloon" in item.get_name():
|
||||
var outside = LocationManager.currentLocation.outside
|
||||
if outside == null or outside == false:
|
||||
pass
|
||||
else:
|
||||
self.translate(Vector2(5, -120)*delta)
|
||||
if position.y < LocationManager.currentLocation.upperCameraLimit:
|
||||
AchievementManager.complete_achievement("Into the Clouds")
|
||||
queue_free()
|
||||
else:
|
||||
handle_terrain(delta)
|
||||
|
||||
func handle_terrain(delta):
|
||||
var mainTerrain = null
|
||||
for terrain in interactingTerrains:
|
||||
if mainTerrain == null or terrain.viscosity > mainTerrain.viscosity:
|
||||
mainTerrain = terrain
|
||||
|
||||
if noTerrainCheckDelay > 0:
|
||||
noTerrainCheckDelay -= delta
|
||||
|
||||
if mainTerrain == null:
|
||||
if noTerrainCheckDelay <= 0:
|
||||
if sinking:
|
||||
stop_sinking()
|
||||
$Waves.visible = false
|
||||
$WhiteCircle.visible = true
|
||||
return
|
||||
|
||||
if mainTerrain is SwimmingZone:
|
||||
$Waves.visible = true
|
||||
$Waves.self_modulate = mainTerrain.liquidColor
|
||||
|
||||
$WhiteCircle.visible = false
|
||||
|
||||
if !(Item.modifications.Wet in item.itemModifications):
|
||||
item.set_modification(Item.modifications.Wet)
|
||||
$ItemSprite.texture = item.get_sprite()
|
||||
|
||||
bobbingDelay -= delta
|
||||
if bobbingDelay <= 0:
|
||||
bobbingDelay = 0.8
|
||||
if $ItemSprite.position.y == -16:
|
||||
$ItemSprite.position.y = -18
|
||||
else:
|
||||
$ItemSprite.position.y = -16
|
||||
else:
|
||||
$Waves.visible = false
|
||||
$WhiteCircle.visible = true
|
||||
|
||||
if sinking:
|
||||
$Waves.visible = false
|
||||
if mainTerrain.viscosity >= item.get_hardness():
|
||||
stop_sinking()
|
||||
else:
|
||||
modulate.a = modulate.a - (delta * sinkingSpeed)
|
||||
if modulate.a <= 0:
|
||||
remove_self()
|
||||
else:
|
||||
if mainTerrain.viscosity < item.get_hardness():
|
||||
if item.get_name(false) != "Worm on a String" and item.get_name(false) != "Basket on a String":
|
||||
start_sinking()
|
||||
|
||||
func stop_sinking():
|
||||
self_modulate.a = 1
|
||||
sinking = false
|
||||
|
||||
func start_sinking():
|
||||
sinking = true
|
||||
|
||||
func remove_self():
|
||||
if GameVariables.player.currentInteractingGroundItem == self:
|
||||
GameVariables.player.change_state("Idle")
|
||||
|
||||
queue_free()
|
||||
96
Objects/GroundItems/GroundItem.tscn
Normal file
96
Objects/GroundItems/GroundItem.tscn
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
[gd_scene load_steps=14 format=3 uid="uid://dhk768odtfjjc"]
|
||||
|
||||
[ext_resource type="Script" path="res://Objects/GroundItems/GroundItem.gd" id="1_fllcp"]
|
||||
[ext_resource type="Texture2D" uid="uid://bbmlkil40xcbc" path="res://MiscArt/WhiteCircle.png" id="2_5slim"]
|
||||
[ext_resource type="PackedScene" uid="uid://bqibe7ha6r5ls" path="res://Interactions/Interactable/interactable.tscn" id="2_phgrr"]
|
||||
[ext_resource type="PackedScene" uid="uid://twerpkipa0v8" path="res://Interactions/Arson/arsonable.tscn" id="3_7pt01"]
|
||||
[ext_resource type="Texture2D" uid="uid://cej2vgmh2je2a" path="res://Objects/GroundItems/Waves.png" id="3_b8gkp"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt2n0yqtg4rdu" path="res://Interactions/Pickupable/Pickupable.tscn" id="4_13rpv"]
|
||||
[ext_resource type="Texture2D" uid="uid://tnmp4kne12kw" path="res://Objects/GroundItems/Waves2.png" id="4_78g78"]
|
||||
[ext_resource type="Script" path="res://Utils/PlayOnReady.gd" id="5_hco08"]
|
||||
[ext_resource type="PackedScene" uid="uid://dxru24e0y16p2" path="res://Interactions/Weavable/Weavable.tscn" id="6_utry8"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_g11ns"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_b8gkp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("4_78g78")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 2.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_4d7js"]
|
||||
radius = 73.0616
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_m1jwd"]
|
||||
radius = 23.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_3gdtd"]
|
||||
radius = 60.0
|
||||
|
||||
[node name="GroundItem" type="Node2D"]
|
||||
z_as_relative = false
|
||||
script = ExtResource("1_fllcp")
|
||||
|
||||
[node name="WhiteCircle" type="Sprite2D" parent="."]
|
||||
self_modulate = Color(0.580392, 1, 1, 0.317647)
|
||||
show_behind_parent = true
|
||||
position = Vector2(0, 2)
|
||||
scale = Vector2(0.783333, 0.366667)
|
||||
texture = ExtResource("2_5slim")
|
||||
|
||||
[node name="ItemSprite" type="Sprite2D" parent="."]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="Waves" type="AnimatedSprite2D" parent="."]
|
||||
visible = false
|
||||
self_modulate = Color(0, 0.564706, 0.568627, 1)
|
||||
position = Vector2(0, -18)
|
||||
sprite_frames = SubResource("SpriteFrames_g11ns")
|
||||
frame_progress = 0.681149
|
||||
script = ExtResource("5_hco08")
|
||||
|
||||
[node name="Interactable" parent="." instance=ExtResource("2_phgrr")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="Panel" parent="Interactable" index="1"]
|
||||
offset_left = -27.0
|
||||
offset_top = -26.0
|
||||
offset_right = 27.0
|
||||
offset_bottom = 26.0
|
||||
|
||||
[node name="Arsonable" parent="." instance=ExtResource("3_7pt01")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="CollisionShape2D" parent="Arsonable/InteractionArea" index="0"]
|
||||
shape = SubResource("CircleShape2D_4d7js")
|
||||
|
||||
[node name="Pickupable" parent="." instance=ExtResource("4_13rpv")]
|
||||
position = Vector2(0, -16)
|
||||
|
||||
[node name="CollisionShape2D" parent="Pickupable/InteractionArea" index="0"]
|
||||
position = Vector2(0, -10)
|
||||
shape = SubResource("CircleShape2D_m1jwd")
|
||||
|
||||
[node name="Weavable" parent="." instance=ExtResource("6_utry8")]
|
||||
position = Vector2(0, -3)
|
||||
|
||||
[node name="CollisionShape2D" parent="Weavable/InteractionArea" index="0"]
|
||||
position = Vector2(0, -9)
|
||||
shape = SubResource("CircleShape2D_3gdtd")
|
||||
|
||||
[node name="TerrainInteractionArea" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="TerrainInteractionArea"]
|
||||
polygon = PackedVector2Array(-23, 4, -23, 0, -20, -4, -12, -8, -4, -9, 6, -9, 16, -6, 21, -3, 23, 0, 23, 4, 20, 8, 13, 11, 4, 13, -7, 13, -15, 10, -21, 7)
|
||||
|
||||
[editable path="Interactable"]
|
||||
[editable path="Interactable/ActionMenu"]
|
||||
[editable path="Arsonable"]
|
||||
[editable path="Pickupable"]
|
||||
[editable path="Weavable"]
|
||||
BIN
Objects/GroundItems/Waves.png
Normal file
BIN
Objects/GroundItems/Waves.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 252 B |
34
Objects/GroundItems/Waves.png.import
Normal file
34
Objects/GroundItems/Waves.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cej2vgmh2je2a"
|
||||
path="res://.godot/imported/Waves.png-cab418e44dc81226a3ca0c9a18cd9ddd.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Objects/GroundItems/Waves.png"
|
||||
dest_files=["res://.godot/imported/Waves.png-cab418e44dc81226a3ca0c9a18cd9ddd.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
|
||||
BIN
Objects/GroundItems/Waves2.png
Normal file
BIN
Objects/GroundItems/Waves2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 254 B |
34
Objects/GroundItems/Waves2.png.import
Normal file
34
Objects/GroundItems/Waves2.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://tnmp4kne12kw"
|
||||
path="res://.godot/imported/Waves2.png-591b6afb003fde1cbe925bc7f10b2bf7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Objects/GroundItems/Waves2.png"
|
||||
dest_files=["res://.godot/imported/Waves2.png-591b6afb003fde1cbe925bc7f10b2bf7.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
|
||||
Loading…
Add table
Add a link
Reference in a new issue