Система диалогов.

This commit is contained in:
Евгений Титаренко 2024-08-19 18:06:14 +03:00
parent 3c1619ee9f
commit 2a2399dc2c
8 changed files with 264 additions and 88 deletions

View file

@ -0,0 +1,23 @@
using Godot;
using System;
public partial class ChatLogContainer : VBoxContainer
{
private const float MaxChatLogContainerSize = 220;
private Vector2 _initialPosition;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
_initialPosition = Position;
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _PhysicsProcess(double delta)
{
if (Size.Y > MaxChatLogContainerSize)
{
Position = _initialPosition + new Vector2(Size.X, MaxChatLogContainerSize) - Size;
}
}
}