32 lines
962 B
C#
32 lines
962 B
C#
using SHADE;
|
|
using System;
|
|
|
|
public class RaccoonSpin : Script
|
|
{
|
|
[SerializeField]
|
|
[Tooltip("Speed of the rotation in radians per second.")]
|
|
private float RotateSpeed = 1.0f;
|
|
private float rotation = 0.0f;
|
|
[SerializeField]
|
|
private CallbackEvent emptyEvent;
|
|
[SerializeField]
|
|
private CallbackEvent<int> testEvent;
|
|
[SerializeField]
|
|
private CallbackEvent<int, double, Vector3> testEvent3 = new CallbackEvent<int, double, Vector3>();
|
|
private Transform Transform;
|
|
|
|
protected override void awake()
|
|
{
|
|
emptyEvent = new CallbackEvent();
|
|
emptyEvent.RegisterAction(() => Debug.Log("Empty event action!"));
|
|
testEvent = new CallbackEvent<int>();
|
|
Action<int> action = (x) => Debug.Log($"{x}");
|
|
testEvent.RegisterAction(action);
|
|
|
|
Transform = GetComponent<Transform>();
|
|
if (Transform == null)
|
|
{
|
|
Debug.LogError("Transform is NULL!");
|
|
}
|
|
}
|
|
} |