Система диалогов.
This commit is contained in:
parent
3c1619ee9f
commit
2a2399dc2c
8 changed files with 264 additions and 88 deletions
23
scripts/ChatLogContainer.cs
Normal file
23
scripts/ChatLogContainer.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue