Various improvements and fixes
This commit is contained in:
@@ -443,6 +443,19 @@ const String& Actor::GetLayerName() const
|
||||
return Level::Layers[_layer];
|
||||
}
|
||||
|
||||
void Actor::SetLayerName(const StringView& value)
|
||||
{
|
||||
for (int32 i = 0; i < 32; i++)
|
||||
{
|
||||
if (Level::Layers[i] == value)
|
||||
{
|
||||
SetLayer(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
LOG(Warning, "Unknown layer name '{0}'", value);
|
||||
}
|
||||
|
||||
bool Actor::HasTag() const
|
||||
{
|
||||
return Tags.Count() != 0;
|
||||
|
||||
@@ -107,6 +107,11 @@ public:
|
||||
/// </summary>
|
||||
API_PROPERTY() const String& GetLayerName() const;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the name of the layer.
|
||||
/// </summary>
|
||||
API_PROPERTY() void SetLayerName(const StringView& value);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this actor has any tag assigned.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user