浮力
This commit is contained in:
40
Assets/Scripts/Editor/FloatBobberControllerProEditor.cs
Normal file
40
Assets/Scripts/Editor/FloatBobberControllerProEditor.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
[CustomEditor(typeof(FloatBobberControllerPro))]
|
||||
public class FloatBobberControllerProEditor : Editor
|
||||
{
|
||||
private FloatBobberControllerPro _target;
|
||||
void OnEnable()
|
||||
{
|
||||
_target = target as FloatBobberControllerPro;
|
||||
// lookAtPoint = serializedObject.FindProperty("lookAtPoint");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
if (GUILayout.Button("TriggerDownPulse"))
|
||||
{
|
||||
_target.TriggerDownPulse();
|
||||
}
|
||||
if (GUILayout.Button("TriggerUpPulse"))
|
||||
{
|
||||
_target.TriggerUpPulse();
|
||||
}
|
||||
if (GUILayout.Button("AddFishPull"))
|
||||
{
|
||||
_target.AddFishPull(0.5f);
|
||||
}
|
||||
if (GUILayout.Button("AddFishPull"))
|
||||
{
|
||||
_target.ReleaseFishPull(0.5f);
|
||||
}
|
||||
// serializedObject.Update();
|
||||
// EditorGUILayout.PropertyField(lookAtPoint);
|
||||
// serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user