update
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public partial class BasicHoldVisualMesh : NoteVisualBaseHold
|
||||
{
|
||||
public MeshGenerator meshGenerator;
|
||||
public SplinePositioner headPoint, tailPoint;
|
||||
|
||||
public static BasicHoldVisualMesh GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
|
||||
{
|
||||
BasicHoldVisualMesh holdVisualMesh = SubstantialObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<BasicHoldVisualMesh>();
|
||||
|
||||
return holdVisualMesh;
|
||||
}
|
||||
|
||||
public override void FirstSetUpObject(bool isFirstGenerated)
|
||||
{
|
||||
NoteBase note = parentElement as NoteBase;
|
||||
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
|
||||
if(!note.isOnTrack) throw new System.Exception("这种HoldNoteVisual只能生成在Track上。");
|
||||
|
||||
this.note = note;
|
||||
note.noteVisual = this;
|
||||
this.hold = note as Hold;
|
||||
this.headPoint = notePartList[0].GetComponent<SplinePositioner>();
|
||||
this.meshGenerator = notePartList[1].GetComponent<MeshGenerator>();
|
||||
this.tailPoint = notePartList[2].GetComponent<SplinePositioner>();
|
||||
|
||||
this.hold.trackPositioner.autoUpdate = false;
|
||||
|
||||
headPoint.spline = hold.track.trackPathSubmodule.path;
|
||||
meshGenerator.spline = hold.track.trackPathSubmodule.path;
|
||||
tailPoint.spline = hold.track.trackPathSubmodule.path;
|
||||
|
||||
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = hold.track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
|
||||
float startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime);
|
||||
float endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
|
||||
|
||||
hold.trackPositioner.SetPercent(startPercent);
|
||||
meshGenerator.SetClipRange(startPercent, endPercent);
|
||||
headPoint.SetPercent(startPercent);
|
||||
tailPoint.SetPercent(endPercent);
|
||||
|
||||
if (isFirstGenerated)
|
||||
{
|
||||
effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(this));
|
||||
//effectSubmodule.effectCollection["Holding"].Add(new BasicNoteHoldingExpand(this));
|
||||
effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(this));
|
||||
effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(this));
|
||||
effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadShrink(this));
|
||||
effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class BasicHoldVisualMesh
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new BasicHoldVisualTube_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
|
||||
}
|
||||
|
||||
private float startPercent, endPercent;
|
||||
public override void UpdateHoldInMovableTrack()
|
||||
{
|
||||
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = hold.track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
|
||||
startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime);
|
||||
endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
|
||||
|
||||
if (hold.isHolding)
|
||||
{
|
||||
startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime + hold.holdingTime);
|
||||
endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
|
||||
}
|
||||
else if (hold.isFinalJudged)
|
||||
{
|
||||
startPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
|
||||
endPercent = trackTimeSubmoduleMovable.GetTrackPercent(hold.holdEndTime);
|
||||
}
|
||||
|
||||
hold.trackPositioner.SetPercent(startPercent);
|
||||
meshGenerator.SetClipRange(startPercent, endPercent);
|
||||
headPoint.SetPercent(startPercent);
|
||||
tailPoint.SetPercent(endPercent);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicHoldVisualTube_BM : SubstantialObject_BM
|
||||
{
|
||||
public BasicHoldVisualTube_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicHoldVisualTube_BM(string elementName, Guid id, List<string> tags,
|
||||
GameElement_BM parent, string themeBundleName, string objectName) :
|
||||
base(elementName, id, tags, parent, themeBundleName, objectName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = BasicHoldVisualMesh.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return BasicHoldVisualMesh.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d94f163ef3d384b7eac5af0a344d786d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public partial class BasicHoldVisualMovable : NoteVisualBaseHold
|
||||
{
|
||||
public static BasicHoldVisualMovable GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
|
||||
{
|
||||
BasicHoldVisualMovable holdVisualMovable = SubstantialObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<BasicHoldVisualMovable>();
|
||||
|
||||
return holdVisualMovable;
|
||||
}
|
||||
|
||||
public override void FirstSetUpObject(bool isFirstGenerated)
|
||||
{
|
||||
NoteBase note = parentElement as NoteBase;
|
||||
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
|
||||
this.note = note;
|
||||
note.noteVisual = this;
|
||||
this.hold = note as Hold;
|
||||
|
||||
if (isFirstGenerated)
|
||||
{
|
||||
effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(this));
|
||||
effectSubmodule.effectCollection["Holding"].Add(new BasicNoteHoldingExpand(this));
|
||||
effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(this));
|
||||
effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(this));
|
||||
effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadShrink(this));
|
||||
effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class BasicHoldVisualMovable
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new Beatmap.BasicHoldVisualMovable_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
|
||||
}
|
||||
|
||||
public override void UpdateHoldInMovableTrack()
|
||||
{
|
||||
if (hold.isHolding)
|
||||
{
|
||||
TrackTimeSubmoduleMovable trackTimeSubmoduleMovable = hold.track.trackTimeSubmodule as TrackTimeSubmoduleMovable;
|
||||
float percent = trackTimeSubmoduleMovable.GetTrackPercent(hold.exactJudgeTime + hold.holdingTime);
|
||||
hold.trackPositioner.SetPercent(percent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicHoldVisualMovable_BM : SubstantialObject_BM
|
||||
{
|
||||
public BasicHoldVisualMovable_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicHoldVisualMovable_BM(string elementName, Guid id, List<string> tags,
|
||||
GameElement_BM parent, string themeBundleName, string objectName) :
|
||||
base(elementName, id, tags, parent, themeBundleName, objectName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = BasicHoldVisualMovable.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return BasicHoldVisualMovable.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cba1fe17342b14361bb504a9a506878b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public partial class BasicHoldVisualStatic : NoteVisualBaseHold
|
||||
{
|
||||
public static BasicHoldVisualStatic GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
|
||||
{
|
||||
BasicHoldVisualStatic holdVisualStatic = SubstantialObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<BasicHoldVisualStatic>();
|
||||
|
||||
return holdVisualStatic;
|
||||
}
|
||||
|
||||
public override void FirstSetUpObject(bool isFirstGenerated)
|
||||
{
|
||||
NoteBase note = parentElement as NoteBase;
|
||||
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
|
||||
this.note = note;
|
||||
note.noteVisual = this;
|
||||
this.hold = note as Hold;
|
||||
|
||||
if (isFirstGenerated)
|
||||
{
|
||||
effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(this));
|
||||
effectSubmodule.effectCollection["Holding"].Add(new BasicNoteHoldingExpand(this));
|
||||
effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(this));
|
||||
effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(this));
|
||||
effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadShrink(this));
|
||||
effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class BasicHoldVisualStatic
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new Beatmap.BasicHoldVisualStatic_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicHoldVisualStatic_BM : SubstantialObject_BM
|
||||
{
|
||||
public BasicHoldVisualStatic_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicHoldVisualStatic_BM(string elementName, Guid id, List<string> tags,
|
||||
GameElement_BM parent, string themeBundleName, string objectName) :
|
||||
base(elementName, id, tags, parent, themeBundleName, objectName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = BasicHoldVisualStatic.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return BasicHoldVisualStatic.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f92b9b8f89de544adaa001ccfdf7eae4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteBadShrink : NoteBadEffect
|
||||
{
|
||||
Renderer noteMainRenderer;
|
||||
public BasicNoteBadShrink(NoteVisualBase noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = note.noteVisual;
|
||||
this.noteMainRenderer = noteVisual.noteMain.GetComponent<Renderer>();
|
||||
this.effectTime = 0.1f;
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteVisual.noteMain.transform.localScale = Vector3.one;
|
||||
noteMainRenderer.material.SetColor("_BaseColor", Color.white);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(true);
|
||||
holdVisualMesh.notePartList[2].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
noteMainRenderer.material.DOColor(Color.clear, effectTime).SetEase(Ease.OutQuad);
|
||||
noteVisual.noteMain.transform.DOScale(Vector3.zero, effectTime).SetEase(Ease.OutQuad).OnComplete(() =>
|
||||
{
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(false);
|
||||
holdVisualMesh.notePartList[2].SetActive(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new Beatmap.BasicNoteBadShrink_BM(effectTime);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteBadShrink_BM : NoteBadEffect_BM
|
||||
{
|
||||
public BasicNoteBadShrink_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteBadShrink_BM(float effectTime) : base(effectTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BasicNoteBadShrink(attachedGameElement as NoteVisualBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3670b926c29e45e5b059ab5ae013d6a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Dreamteck.Splines;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteGenerateExpand : NoteGenerateEffect
|
||||
{
|
||||
public BasicNoteGenerateExpand(NoteVisualBase noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = noteVisual;
|
||||
this.generateTime = 1f;
|
||||
this.effectTime = 0.1f;
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
noteVisual.noteMain.transform.localScale = Vector3.zero;
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(false);
|
||||
holdVisualMesh.notePartList[1].GetComponent<MeshGenerator>().size = 0;
|
||||
holdVisualMesh.notePartList[2].SetActive(false);
|
||||
holdVisualMesh.notePartList[2].transform.localScale = Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteVisual.noteMain.transform.DOScale(Vector3.one, effectTime).SetEase(Ease.OutBack);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(true);
|
||||
MeshGenerator meshGenerator = holdVisualMesh.notePartList[1].GetComponent<MeshGenerator>();
|
||||
DOTween.To(() => meshGenerator.size, x => meshGenerator.size = x, 1, effectTime).SetEase(Ease.OutBack);
|
||||
holdVisualMesh.notePartList[2].SetActive(true);
|
||||
holdVisualMesh.notePartList[2].transform.DOScale(Vector3.one, effectTime).SetEase(Ease.OutBack);
|
||||
}
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new BasicNoteGenerateExpand_BM(effectTime, generateTime);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteGenerateExpand_BM : NoteGenerateEffect_BM
|
||||
{
|
||||
public BasicNoteGenerateExpand_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteGenerateExpand_BM(float effectTime, float generateTime) :
|
||||
base(effectTime, generateTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BasicNoteGenerateExpand(attachedGameElement as NoteVisualBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d03309d69f59b4d25b6749ada9160c6b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteGoodBurst : NoteGoodEffect
|
||||
{
|
||||
private GameObject effectRing;
|
||||
|
||||
public BasicNoteGoodBurst(NoteVisualBase noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = noteVisual;
|
||||
this.effectRing = noteVisual.effectPartList[0];
|
||||
this.effectTime = 0.1f;
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
effectRing.SetActive(false);
|
||||
effectRing.transform.localScale = Vector3.zero;
|
||||
effectRing.GetComponent<SpriteRenderer>().color = Color.white;
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(true);
|
||||
holdVisualMesh.notePartList[2].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
effectRing.gameObject.SetActive(true);
|
||||
effectRing.transform.DOScale(Vector3.one * 0.5f, effectTime).SetEase(Ease.OutQuad);
|
||||
effectRing.GetComponent<SpriteRenderer>().DOFade(0, effectTime).SetEase(Ease.OutQuad).OnComplete(() => effectRing.SetActive(false));
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(false);
|
||||
holdVisualMesh.notePartList[2].SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new BasicNoteGoodBurst_BM(effectTime);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteGoodBurst_BM : NoteGoodEffect_BM
|
||||
{
|
||||
public BasicNoteGoodBurst_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteGoodBurst_BM(float effectTime) : base(effectTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BasicNoteGoodBurst(attachedGameElement as NoteVisualBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 01c52632ad5b643f58504f3b8294d253
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteHoldingExpand : NoteHoldingEffect
|
||||
{
|
||||
public BasicNoteHoldingExpand(NoteVisualBaseHold noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = noteVisual;
|
||||
this.effectTime = GetHoldingTime();
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteVisual.noteMain.transform.localScale = Vector3.one;
|
||||
this.effectTime = GetHoldingTime();//TODO: 后续改为修改Hold的判定时间和结束时间时,自动调整effectTime
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
noteVisual.noteMain.transform.localScale = Vector3.one * 2f;
|
||||
}
|
||||
|
||||
public override void Execute()
|
||||
{
|
||||
noteVisual.noteMain.transform.localScale = Vector3.one + Vector3.one * effectProgressPercent;
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new BasicNoteHoldingExpand_BM(effectTime);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteHoldingExpand_BM : NoteHoldingEffect_BM
|
||||
{
|
||||
public BasicNoteHoldingExpand_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteHoldingExpand_BM(float effectTime) : base(effectTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BasicNoteHoldingExpand(attachedGameElement as NoteVisualBaseHold);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 971e63ea1e76642e7931d0b40be179bc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNoteMissPale : NoteMissEffect
|
||||
{
|
||||
Renderer noteMainRenderer;
|
||||
|
||||
public BasicNoteMissPale(NoteVisualBase noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = noteVisual;
|
||||
this.noteMainRenderer = noteVisual.noteMain.GetComponent<Renderer>();
|
||||
this.effectTime = 0.2f;
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
noteMainRenderer.material.SetColor("_BaseColor", Color.white);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(true);
|
||||
holdVisualMesh.notePartList[2].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
noteMainRenderer.material.SetColor("_BaseColor", Color.white / 2f);
|
||||
noteMainRenderer.material.DOColor(Color.clear, effectTime).SetEase(Ease.OutQuad).OnComplete(() =>
|
||||
{
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(false);
|
||||
holdVisualMesh.notePartList[2].SetActive(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new Beatmap.BasicNoteMissPale_BM(effectTime);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteMissPale_BM : NoteMissEffect_BM
|
||||
{
|
||||
public BasicNoteMissPale_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteMissPale_BM(float effectTime) : base(effectTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BasicNoteMissPale(attachedGameElement as NoteVisualBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 403dbcfe52a994428a72e2d7dbc2bb50
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class BasicNotePerfectBurst : NotePerfectEffect
|
||||
{
|
||||
private GameObject effectRing;
|
||||
|
||||
public BasicNotePerfectBurst(NoteVisualBase noteVisual)
|
||||
{
|
||||
this.note = noteVisual.note;
|
||||
this.noteVisual = noteVisual;
|
||||
this.effectRing = noteVisual.effectPartList[0];
|
||||
this.effectTime = 0.1f;
|
||||
}
|
||||
|
||||
public override void Recover()
|
||||
{
|
||||
effectRing.SetActive(false);
|
||||
effectRing.transform.localScale = Vector3.zero;
|
||||
effectRing.GetComponent<SpriteRenderer>().color = Color.white;
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(true);
|
||||
holdVisualMesh.notePartList[2].SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
effectRing.gameObject.SetActive(true);
|
||||
effectRing.transform.DOScale(Vector3.one, effectTime).SetEase(Ease.OutQuad);
|
||||
effectRing.GetComponent<SpriteRenderer>().DOFade(0, effectTime).SetEase(Ease.OutQuad).OnComplete(() => effectRing.SetActive(false));
|
||||
noteVisual.noteMain.SetActive(false);
|
||||
|
||||
if (noteVisual is BasicHoldVisualMesh holdVisualMesh)
|
||||
{
|
||||
holdVisualMesh.notePartList[1].SetActive(false);
|
||||
holdVisualMesh.notePartList[2].SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new BasicNotePerfectBurst_BM(effectTime);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNotePerfectBurst_BM : NotePerfectEffect_BM
|
||||
{
|
||||
public BasicNotePerfectBurst_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNotePerfectBurst_BM(float effectTime) : base(effectTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
|
||||
{
|
||||
return new BasicNotePerfectBurst(attachedGameElement as NoteVisualBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15a3d3264a53c481c9fc2db8ac8a76e4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Lean.Pool;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public partial class BasicNoteVisual : NoteVisualBase
|
||||
{
|
||||
public static BasicNoteVisual GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
|
||||
{
|
||||
BasicNoteVisual noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<BasicNoteVisual>();
|
||||
|
||||
return noteVisual;
|
||||
}
|
||||
|
||||
public override void FirstSetUpObject(bool isFirstGenerated)
|
||||
{
|
||||
NoteBase note = parentElement as NoteBase;
|
||||
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
|
||||
this.note = note;
|
||||
note.noteVisual = this;
|
||||
|
||||
if (isFirstGenerated)
|
||||
{
|
||||
effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(this));
|
||||
effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(this));
|
||||
effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(this));
|
||||
effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadShrink(this));
|
||||
effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class BasicNoteVisual
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new Beatmap.BasicNoteVisual_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM, themeBundleName, objectName);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteVisual_BM : SubstantialObject_BM
|
||||
{
|
||||
public BasicNoteVisual_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteVisual_BM(string elementName, Guid id, List<string> tags,
|
||||
GameElement_BM parent, string themeBundleName, string objectName) :
|
||||
base(elementName, id, tags, parent, themeBundleName, objectName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = BasicNoteVisual.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return BasicNoteVisual.GenerateElement(elementName, Guid.NewGuid(), tags, false, parent, themeBundleName, objectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72caf325f2b59403c94193cd2037b7ba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user