add anthill model
This commit is contained in:
parent
493420acdd
commit
392ec5372c
BIN
assets/models/anthill.glb
(Stored with Git LFS)
Normal file
BIN
assets/models/anthill.glb
(Stored with Git LFS)
Normal file
Binary file not shown.
43
assets/models/anthill.glb.import
Normal file
43
assets/models/anthill.glb.import
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://b0koc3o63etu1"
|
||||||
|
path="res://.godot/imported/anthill.glb-5b6c8f58d961f196bcc8e93454476786.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/models/anthill.glb"
|
||||||
|
dest_files=["res://.godot/imported/anthill.glb-5b6c8f58d961f196bcc8e93454476786.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name="Anthill"
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={
|
||||||
|
"materials": {
|
||||||
|
"anthill_mat": {
|
||||||
|
"use_external/enabled": true,
|
||||||
|
"use_external/path": "res://resources/materials/anthill_material.tres"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gltf/naming_version=1
|
||||||
|
gltf/embedded_image_handling=1
|
||||||
BIN
assets/textures/structures/anthill_albedo.png
(Stored with Git LFS)
Normal file
BIN
assets/textures/structures/anthill_albedo.png
(Stored with Git LFS)
Normal file
Binary file not shown.
35
assets/textures/structures/anthill_albedo.png.import
Normal file
35
assets/textures/structures/anthill_albedo.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b7m104tc2wch3"
|
||||||
|
path.bptc="res://.godot/imported/anthill_albedo.png-bbaa35e5b6a354eec93c815c4147a0e5.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/textures/structures/anthill_albedo.png"
|
||||||
|
dest_files=["res://.godot/imported/anthill_albedo.png-bbaa35e5b6a354eec93c815c4147a0e5.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
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=0
|
||||||
7
resources/materials/anthill_material.tres
Normal file
7
resources/materials/anthill_material.tres
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://bgc0omqgojp6n"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b7m104tc2wch3" path="res://assets/textures/structures/anthill_albedo.png" id="1_3h7nr"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
shading_mode = 0
|
||||||
|
albedo_texture = ExtResource("1_3h7nr")
|
||||||
@ -3,8 +3,7 @@
|
|||||||
[ext_resource type="Script" path="res://scripts/anthill.gd" id="1_8k02d"]
|
[ext_resource type="Script" path="res://scripts/anthill.gd" id="1_8k02d"]
|
||||||
[ext_resource type="Material" uid="uid://f0nlf4tdpvbd" path="res://resources/materials/indicators/hover_indicator_mat.tres" id="2_44p2d"]
|
[ext_resource type="Material" uid="uid://f0nlf4tdpvbd" path="res://resources/materials/indicators/hover_indicator_mat.tres" id="2_44p2d"]
|
||||||
[ext_resource type="Script" path="res://scripts/sound_effects_player.gd" id="3_vp3nf"]
|
[ext_resource type="Script" path="res://scripts/sound_effects_player.gd" id="3_vp3nf"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b0koc3o63etu1" path="res://assets/models/anthill.glb" id="4_tp2c4"]
|
||||||
[sub_resource type="CapsuleMesh" id="CapsuleMesh_x8apu"]
|
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ruupa"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_ruupa"]
|
||||||
|
|
||||||
@ -17,24 +16,31 @@ orientation = 1
|
|||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
script = ExtResource("1_8k02d")
|
script = ExtResource("1_8k02d")
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
[node name="Anthill" parent="." instance=ExtResource("4_tp2c4")]
|
||||||
mesh = SubResource("CapsuleMesh_x8apu")
|
|
||||||
|
[node name="Anthill" parent="Anthill" index="0"]
|
||||||
|
layers = 32
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||||
shape = SubResource("BoxShape3D_ruupa")
|
shape = SubResource("BoxShape3D_ruupa")
|
||||||
|
|
||||||
[node name="UiOrigin" type="Marker3D" parent="."]
|
[node name="UiOrigin" type="Marker3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.15587, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.0356, 0)
|
||||||
|
|
||||||
[node name="HoverIndicator" type="MeshInstance3D" parent="."]
|
[node name="HoverIndicator" type="MeshInstance3D" parent="."]
|
||||||
transform = Transform3D(1.62268, 0, 0, 0, 1.62268, 0, 0, 0, 1.62268, 0, 0, 0)
|
transform = Transform3D(2.703, 0, 0, 0, 2.703, 0, 0, 0, 2.703, 0, 0, 0)
|
||||||
cast_shadow = 0
|
cast_shadow = 0
|
||||||
mesh = SubResource("QuadMesh_2gykr")
|
mesh = SubResource("QuadMesh_2gykr")
|
||||||
|
|
||||||
[node name="NavigationObstacle3D" type="NavigationObstacle3D" parent="."]
|
|
||||||
radius = 0.57
|
|
||||||
|
|
||||||
[node name="SoundEffectsPlayer" type="AudioStreamPlayer3D" parent="."]
|
[node name="SoundEffectsPlayer" type="AudioStreamPlayer3D" parent="."]
|
||||||
unit_size = 20.0
|
unit_size = 20.0
|
||||||
script = ExtResource("3_vp3nf")
|
script = ExtResource("3_vp3nf")
|
||||||
|
|
||||||
|
[node name="NavigationObstacle3D" type="NavigationObstacle3D" parent="."]
|
||||||
|
radius = 0.6
|
||||||
|
|
||||||
|
[node name="DepositPoint" type="Marker3D" parent="."]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.102205, 0.382582, 0.248212)
|
||||||
|
|
||||||
|
[editable path="Anthill"]
|
||||||
|
|||||||
@ -13,6 +13,8 @@ var _nitwit_scene := preload("res://scenes/units/ant_nitwit.tscn")
|
|||||||
var _gatherer_scene := preload("res://scenes/units/ant_gatherer.tscn")
|
var _gatherer_scene := preload("res://scenes/units/ant_gatherer.tscn")
|
||||||
|
|
||||||
@onready var ui_origin: Node3D = $UiOrigin
|
@onready var ui_origin: Node3D = $UiOrigin
|
||||||
|
@onready var deposit_point: Node3D = $DepositPoint
|
||||||
|
@onready var animation_player: AnimationPlayer = $Anthill/AnimationPlayer
|
||||||
@onready var audio_player: SoundEffectsPlayer = (
|
@onready var audio_player: SoundEffectsPlayer = (
|
||||||
$SoundEffectsPlayer
|
$SoundEffectsPlayer
|
||||||
)
|
)
|
||||||
@ -39,6 +41,8 @@ func deposit_honeydew(amount: int) -> int:
|
|||||||
leftover = new_honeydew_amount - max_honeydew
|
leftover = new_honeydew_amount - max_honeydew
|
||||||
else:
|
else:
|
||||||
honeydew = new_honeydew_amount
|
honeydew = new_honeydew_amount
|
||||||
|
animation_player.stop()
|
||||||
|
animation_player.play("plop_down")
|
||||||
return leftover
|
return leftover
|
||||||
|
|
||||||
|
|
||||||
@ -84,5 +88,8 @@ func _create_unit(
|
|||||||
)
|
)
|
||||||
if ding:
|
if ding:
|
||||||
audio_player.play_sound(SoundManager.ding())
|
audio_player.play_sound(SoundManager.ding())
|
||||||
|
animation_player.stop()
|
||||||
|
animation_player.play("plop_up")
|
||||||
|
|
||||||
buy_ant.emit()
|
buy_ant.emit()
|
||||||
return new_unit
|
return new_unit
|
||||||
|
|||||||
@ -171,7 +171,9 @@ func _deposit() -> void:
|
|||||||
_unit.animation_playback.travel("plop_up")
|
_unit.animation_playback.travel("plop_up")
|
||||||
audio_player.play_sound(SoundManager.swoosh())
|
audio_player.play_sound(SoundManager.swoosh())
|
||||||
|
|
||||||
await item.start_tweening(_unit.anthill.global_position).tween_finished
|
await item.start_tweening(
|
||||||
|
_unit.anthill.deposit_point.global_position
|
||||||
|
).tween_finished
|
||||||
|
|
||||||
audio_player.play_sound(SoundManager.tok())
|
audio_player.play_sound(SoundManager.tok())
|
||||||
item.remove_from_spawner()
|
item.remove_from_spawner()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user