quantum-space-buddies/QSB/Utility/QSBExtensions.cs
Mister_Nebula 13b8632dcd start
2020-08-13 10:16:56 +01:00

31 lines
687 B
C#

using UnityEngine;
namespace QSB.Utility
{
public static class QSBExtensions
{
public static void ChangeEquipState(this PlayerTool tool, bool equipState)
{
if (equipState)
{
tool.EquipTool();
}
else
{
tool.UnequipTool();
}
}
public static string GetHierarchy(this GameObject go)
{
var name = go.name;
while (go.transform.parent != null)
{
go = go.transform.parent.gameObject;
name = go.name + "/" + name;
}
return name;
}
}
}