using Godot; using Ecosystem.utility; namespace Ecosystem.scenes.entities; public partial class BaseEntity : Area2D { [Signal] public delegate BaseEntity EntitySelectedEventHandler(); [Signal] public delegate BaseEntity EntityDeselectedEventHandler(); public Data.EntityData _data; protected Vector2 ScreenSize; protected AnimationPlayer animationPlayer; protected Sprite2D sprite; protected CollisionShape2D collisionShape; protected bool selected; protected Label positionLabel; public override void _Ready() { ScreenSize = GetViewportRect().Size; sprite = GetNode("Sprite2D"); collisionShape = GetNode("CollisionShape2D"); animationPlayer = sprite.GetNode("AnimationPlayer"); positionLabel = GetNode