2021-12-06 09:53:06 +00:00
|
|
|
|
using QSB.WorldSync;
|
2021-12-04 14:21:11 +00:00
|
|
|
|
|
|
|
|
|
namespace QSB.TornadoSync.WorldObjects
|
|
|
|
|
{
|
|
|
|
|
public class QSBTornado : WorldObject<TornadoController>
|
|
|
|
|
{
|
2021-12-06 04:09:54 +00:00
|
|
|
|
public bool FormState
|
2021-12-05 11:41:07 +00:00
|
|
|
|
{
|
2021-12-06 04:09:54 +00:00
|
|
|
|
get => AttachedObject._tornadoRoot.activeSelf // forming or formed or collapsing
|
|
|
|
|
&& !AttachedObject._tornadoCollapsing; // and not collapsing
|
|
|
|
|
set
|
2021-12-05 11:41:07 +00:00
|
|
|
|
{
|
2021-12-06 04:09:54 +00:00
|
|
|
|
if (FormState == value)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (value)
|
|
|
|
|
{
|
|
|
|
|
AttachedObject._tornadoCollapsing = false;
|
|
|
|
|
AttachedObject.StartFormation();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
AttachedObject._secondsUntilFormation = 0;
|
|
|
|
|
AttachedObject.StartCollapse();
|
|
|
|
|
}
|
2021-12-05 11:41:07 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-12-04 14:21:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|