32 lines
528 B
C#
32 lines
528 B
C#
|
|
using Godot;
|
|
using System.Collections.Generic;
|
|
using System;
|
|
namespace Rokojori
|
|
{
|
|
[Tool]
|
|
[GlobalClass,Icon("res://addons/rokojori_action_library/Icons/SensorManager.svg")]
|
|
public partial class SensorViewer: Node
|
|
{
|
|
[Export]
|
|
public Sensor sensor;
|
|
|
|
[Export]
|
|
public float value;
|
|
|
|
[Export]
|
|
public bool active;
|
|
|
|
|
|
public override void _Process(double delta)
|
|
{
|
|
if ( sensor == null )
|
|
{
|
|
return;
|
|
}
|
|
|
|
value = sensor.value;
|
|
active = sensor.isActive;
|
|
}
|
|
}
|
|
} |