ajout d'une gui en 3d, d'un tuto et correction de bug à la pelletée
This commit is contained in:
@@ -138,15 +138,10 @@ func card_info() -> CardInfo:
|
||||
data.archetype.archetype_name
|
||||
)
|
||||
|
||||
var state = data.get_state()
|
||||
|
||||
info.important_stat_icon = PLANT_POINT_ICON
|
||||
info.important_stat_text = "%d" % calculate_plant_score()
|
||||
info.type_icon = PLANT_TYPE_ICON
|
||||
|
||||
var state_text = tr("MATURE")
|
||||
if state != PlantData.State.MATURE:
|
||||
state_text = tr("GROWING")
|
||||
|
||||
info.stats.append_array([
|
||||
CardStatInfo.new(
|
||||
|
||||
@@ -9,7 +9,8 @@ const PLACEHOLDER_GROWING_TEXTURE : Texture = preload("res://entities/plants/ass
|
||||
func build_seed_texture(_random_seed : int) -> Texture:
|
||||
return PLACEHOLDER_SEED_TEXTURE
|
||||
|
||||
func build_plant_texture(plant_data : PlantData) -> Texture:
|
||||
func build_plant_texture(plant_data : PlantData) -> Texture:
|
||||
|
||||
match plant_data.get_state():
|
||||
PlantData.State.MATURE:
|
||||
return PLACEHOLDER_MATURE_TEXTURE
|
||||
|
||||
@@ -97,7 +97,6 @@ func is_full():
|
||||
return true
|
||||
|
||||
func clear():
|
||||
print("clearing inventory")
|
||||
for i in range(len(items)):
|
||||
items[i] = null
|
||||
updated.emit(self)
|
||||
|
||||
@@ -39,6 +39,6 @@ func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||
|
||||
return true
|
||||
|
||||
func harvest(p : Plant, player: Player):
|
||||
func harvest(p : Plant, _player: Player):
|
||||
AudioManager.play_sfx("Harvest")
|
||||
p.harvest()
|
||||
|
||||
@@ -38,6 +38,8 @@ func _physics_process(delta):
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
var input_dir = Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
if Input.is_action_pressed("move_pointer"):
|
||||
input_dir.y = -1
|
||||
var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
if direction:
|
||||
velocity.x = direction.x * SPEED
|
||||
|
||||
Reference in New Issue
Block a user