36 lines
No EOL
1.3 KiB
C#
36 lines
No EOL
1.3 KiB
C#
using System;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
|
|
namespace gay.lilyy.aacshared.runtimecomponents
|
|
{
|
|
[AddComponentMenu("LillithRosePup/Floater")]
|
|
public class FloaterDefinition: MonoBehaviour, IEditorOnly {
|
|
|
|
// unity needs this to show the enable/disable box
|
|
void Start(){}
|
|
public float floatHeight = 0;
|
|
[Tooltip("Time in seconds for one full spin cycle")]
|
|
public float loopInSeconds = 10f;
|
|
[Tooltip("Number of times object spins in one loop")]
|
|
public int spinCycles = 2;
|
|
[Tooltip("Axis to spin around (x, y, or z)")]
|
|
public string spinAxis = "z";
|
|
public bool enableOnPC = true;
|
|
[Tooltip("Quest, Pico, Android/iOS Mobile, etc.")]
|
|
public bool enableOnMobile = true;
|
|
|
|
[Tooltip("If set, this parameter will toggle the floater on/off")]
|
|
public string toggleParamName = "";
|
|
|
|
|
|
/** <summary>
|
|
Compares two FloaterDefinitions for equality based on their properties.
|
|
Used for chunking similar floaters into one animation layer
|
|
</summary> */
|
|
public override int GetHashCode()
|
|
{
|
|
return HashCode.Combine(floatHeight, loopInSeconds, spinCycles, enableOnPC, enableOnMobile, toggleParamName);
|
|
}
|
|
}
|
|
} |