采音器初步
This commit is contained in:
@@ -6,6 +6,7 @@ using Ichni.Editor;
|
||||
using Ichni.RhythmGame;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.Profiling;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace Ichni.Editor
|
||||
@@ -34,6 +35,13 @@ namespace Ichni.Editor
|
||||
graphicalFlexibleFloatWindow.Initialize(baseElement, title, FlexibleFloats, subTitle);
|
||||
return graphicalFlexibleFloatWindow;
|
||||
}
|
||||
public SampleWindow GenerateSampler(GameElement baseElement, string title)
|
||||
{
|
||||
SampleWindow sampler = Object.Instantiate(EditorManager.instance.basePrefabs.sampler, EditorManager.instance.uiManager.inspector.inspectorCanvas.GetComponent<RectTransform>())
|
||||
.GetComponent<SampleWindow>();
|
||||
sampler.Initialize(baseElement, title);
|
||||
return sampler;
|
||||
}
|
||||
public DynamicUIContainer GenerateContainer(string titleText)
|
||||
{
|
||||
DynamicUIContainer container =
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening.Core.Easing;
|
||||
using Ichni;
|
||||
using UnityEngine;
|
||||
|
||||
public static class WindowAnim
|
||||
@@ -41,6 +43,18 @@ public static class WindowAnim
|
||||
gameObject.transform.localScale = Vector3.zero;
|
||||
|
||||
}
|
||||
|
||||
public static IEnumerator Shake(GameObject gameObject)
|
||||
{
|
||||
float timer = 0f;
|
||||
Vector3 origpos = gameObject.transform.position;
|
||||
while (timer <= 1f)
|
||||
{
|
||||
float offset = 50 * AnimationCurveEvaluator.Evaluate(AnimationCurveType.OutElastic, timer / 1f);
|
||||
gameObject.transform.position = origpos + new Vector3(Random.Range(-offset, offset), Random.Range(-offset, offset), 0);
|
||||
timer += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
gameObject.transform.position = origpos;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user