基础内容-7
Trail 完整Note
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteBadExpand : NoteEffectBase
|
||||
{
|
||||
Renderer noteMainRenderer;
|
||||
public BasicNoteBadExpand(NoteBase note)
|
||||
{
|
||||
this.note = note;
|
||||
this.noteVisual = note.noteVisual.GetComponent<BasicNoteVisual>();
|
||||
this.noteMainRenderer = noteVisual.noteMain.GetComponent<Renderer>();
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteVisual.noteMain.transform.localScale = Vector3.one;
|
||||
noteMainRenderer.material.SetColor("_BaseColor", Color.white);
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
noteMainRenderer.material.DOColor(Color.clear, 0.2f).SetEase(Ease.OutQuad);
|
||||
noteVisual.noteMain.transform.DOScale(Vector3.one * 1.5f, 0.2f).SetEase(Ease.OutQuad).OnComplete(() => noteVisual.noteMain.SetActive(false));
|
||||
}
|
||||
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime )
|
||||
{
|
||||
return EffectState.Before;
|
||||
}
|
||||
|
||||
if (songTime >= note.exactJudgeTime &&
|
||||
songTime <= note.exactJudgeTime + effectTime)
|
||||
{
|
||||
return EffectState.Middle;
|
||||
}
|
||||
|
||||
if (songTime > note.exactJudgeTime + effectTime)
|
||||
{
|
||||
return EffectState.After;
|
||||
}
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3670b926c29e45e5b059ab5ae013d6a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,58 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteGoodBurst : NoteEffectBase
|
||||
{
|
||||
private GameObject effectRing;
|
||||
|
||||
public BasicNoteGoodBurst(NoteBase note)
|
||||
{
|
||||
this.note = note;
|
||||
this.noteVisual = note.noteVisual.GetComponent<BasicNoteVisual>();
|
||||
this.effectRing = noteVisual.effectPartList[0];
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
effectRing.SetActive(false);
|
||||
effectRing.transform.localScale = Vector3.zero;
|
||||
effectRing.GetComponent<SpriteRenderer>().color = Color.white;
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
effectRing.gameObject.SetActive(true);
|
||||
effectRing.transform.DOScale(Vector3.one * 0.5f, 0.1f).SetEase(Ease.OutQuad);
|
||||
effectRing.GetComponent<SpriteRenderer>().DOFade(0, 0.1f).SetEase(Ease.OutQuad).OnComplete(() => effectRing.SetActive(false));
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
}
|
||||
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime )
|
||||
{
|
||||
return EffectState.Before;
|
||||
}
|
||||
|
||||
if (songTime >= note.exactJudgeTime &&
|
||||
songTime <= note.exactJudgeTime + effectTime)
|
||||
{
|
||||
return EffectState.Middle;
|
||||
}
|
||||
|
||||
if (songTime > note.exactJudgeTime + effectTime)
|
||||
{
|
||||
return EffectState.After;
|
||||
}
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01c52632ad5b643f58504f3b8294d253
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,55 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteMissPale : NoteEffectBase
|
||||
{
|
||||
Renderer noteMainRenderer;
|
||||
|
||||
public BasicNoteMissPale(NoteBase note)
|
||||
{
|
||||
this.note = note;
|
||||
this.noteVisual = note.noteVisual.GetComponent<BasicNoteVisual>();
|
||||
this.noteMainRenderer = noteVisual.noteMain.GetComponent<Renderer>();
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteMainRenderer.material.SetColor("_BaseColor", Color.white);
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteMainRenderer.material.SetColor("_BaseColor", Color.white / 2f);
|
||||
noteMainRenderer.material.DOColor(Color.clear, 0.2f).SetEase(Ease.OutQuad);
|
||||
}
|
||||
|
||||
public override EffectState CheckEffectState()
|
||||
{
|
||||
float songTime = EditorManager.instance.songModule.songTime;
|
||||
|
||||
if (songTime < note.exactJudgeTime )
|
||||
{
|
||||
return EffectState.Before;
|
||||
}
|
||||
|
||||
if (songTime >= note.exactJudgeTime &&
|
||||
songTime <= note.exactJudgeTime + effectTime)
|
||||
{
|
||||
return EffectState.Middle;
|
||||
}
|
||||
|
||||
if (songTime > note.exactJudgeTime + effectTime)
|
||||
{
|
||||
return EffectState.After;
|
||||
}
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 403dbcfe52a994428a72e2d7dbc2bb50
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -27,8 +27,8 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
public override void Adjust()
|
||||
{
|
||||
effectRing.gameObject.SetActive(true);
|
||||
effectRing.transform.DOScale(Vector3.one, 0.1f).SetEase(Ease.OutBack);
|
||||
effectRing.GetComponent<SpriteRenderer>().DOFade(0, 0.1f).SetEase(Ease.OutBack).OnComplete(() => effectRing.SetActive(false));
|
||||
effectRing.transform.DOScale(Vector3.one, 0.1f).SetEase(Ease.OutQuad);
|
||||
effectRing.GetComponent<SpriteRenderer>().DOFade(0, 0.1f).SetEase(Ease.OutQuad).OnComplete(() => effectRing.SetActive(false));
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Lean.Pool;
|
||||
@@ -7,12 +8,12 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteVisual : NoteVisualBase
|
||||
{
|
||||
public new static BasicNoteVisual GenerateElement(string elementName, string themeBundleName,
|
||||
string objectName, Vector3 position, Vector3 eulerAngles, Vector3 scale, BaseElement parent,
|
||||
bool isFirstGenerated = true)
|
||||
public new static BasicNoteVisual GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
string themeBundleName, string objectName,
|
||||
Vector3 position, Vector3 eulerAngles, Vector3 scale, BaseElement parent, bool isFirstGenerated = true)
|
||||
{
|
||||
BasicNoteVisual noteVisual = SubstantialObject
|
||||
.GenerateElement(elementName, themeBundleName, objectName, position, eulerAngles, scale, parent, isFirstGenerated)
|
||||
.GenerateElement(elementName, id, tags, themeBundleName, objectName, position, eulerAngles, scale, parent, isFirstGenerated)
|
||||
.GetComponent<BasicNoteVisual>();
|
||||
|
||||
NoteBase note = parent as NoteBase;
|
||||
@@ -24,6 +25,9 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
note.generateEffects.effectList.Add(new BasicNoteGenerateExpand(noteVisual.note));
|
||||
note.perfectJudgeEffects.effectList.Add(new BasicNotePerfectBurst(noteVisual.note));
|
||||
note.goodJudgeEffects.effectList.Add(new BasicNoteGoodBurst(noteVisual.note));
|
||||
note.badJudgeEffects.effectList.Add(new BasicNoteBadExpand(noteVisual.note));
|
||||
note.missJudgeEffects.effectList.Add(new BasicNoteMissPale(noteVisual.note));
|
||||
}
|
||||
|
||||
return noteVisual;
|
||||
|
||||
Reference in New Issue
Block a user