64 lines
1.3 KiB
C#
64 lines
1.3 KiB
C#
using Godot;
|
|
|
|
using System.Collections.Generic;
|
|
using System;
|
|
|
|
namespace Rokojori
|
|
{
|
|
[Tool,GlobalClass]
|
|
public partial class NodeStateConfiguration:Resource
|
|
{
|
|
[Export]
|
|
public Trillean processEnabled = Trillean.Any;
|
|
|
|
[Export]
|
|
public Trillean inputEnabled = Trillean.Any;
|
|
|
|
[Export]
|
|
public Trillean physicsEnabled = Trillean.Any;
|
|
|
|
[Export]
|
|
public Trillean signalsEnabled = Trillean.Any;
|
|
|
|
[Export]
|
|
public Trillean visible = Trillean.Any;
|
|
|
|
|
|
[Export]
|
|
public bool setProcessMode = false;
|
|
|
|
[Export]
|
|
public Node.ProcessModeEnum processMode;
|
|
|
|
|
|
public static NodeStateConfiguration All( Trillean value )
|
|
{
|
|
var config = new NodeStateConfiguration();
|
|
|
|
config.processEnabled = value;
|
|
config.inputEnabled = value;
|
|
config.physicsEnabled = value;
|
|
config.signalsEnabled = value;
|
|
config.visible = value;
|
|
|
|
config.setProcessMode = true;
|
|
|
|
config.processMode = Trillean.True == value ? Node.ProcessModeEnum.Inherit : Node.ProcessModeEnum.Disabled;
|
|
|
|
return config;
|
|
}
|
|
|
|
public static NodeStateConfiguration AllOn()
|
|
{
|
|
return All( Trillean.True );
|
|
}
|
|
|
|
public static NodeStateConfiguration AllOff()
|
|
{
|
|
return All( Trillean.False );
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|