update
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 606404be0d7ff4063a24f3f1284c4120
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
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 partial class DirectionalLight : EnvironmentObject
|
||||
{
|
||||
[SerializeField]
|
||||
private Light directionalLight;
|
||||
|
||||
public float intensity;
|
||||
public bool castShadows;
|
||||
|
||||
public static DirectionalLight GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName,
|
||||
bool isStatic, float intensity, bool castShadows)
|
||||
{
|
||||
DirectionalLight dirLight = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<DirectionalLight>();
|
||||
|
||||
dirLight.intensity = intensity;
|
||||
dirLight.castShadows = castShadows;
|
||||
return dirLight;
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
directionalLight.color = colorSubmodule.currentBaseColor;
|
||||
directionalLight.intensity = intensity;
|
||||
directionalLight.shadows = castShadows ? LightShadows.Soft : LightShadows.None;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class DirectionalLight
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new DirectionalLight_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
|
||||
themeBundleName, objectName, isStatic, intensity, castShadows);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class DirectionalLight_BM : EnvironmentObject_BM
|
||||
{
|
||||
public float intensity;
|
||||
public bool castShadows;
|
||||
|
||||
public DirectionalLight_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DirectionalLight_BM(string elementName, Guid id, List<string> tags,
|
||||
GameElement_BM parent, string themeBundleName, string objectName, bool isStatic,
|
||||
float intensity, bool castShadows) :
|
||||
base(elementName, id, tags, parent, themeBundleName, objectName, isStatic)
|
||||
{
|
||||
this.intensity = intensity;
|
||||
this.castShadows = castShadows;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = DirectionalLight.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName, isStatic, intensity, castShadows);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return DirectionalLight.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
parent, themeBundleName, objectName, isStatic, intensity, castShadows);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d3011bfdcb00476fbd1a7de86d1c1cb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public class JudgeTrigger : EnvironmentObject, IHaveNoteJudgeTriggerSubmodule
|
||||
{
|
||||
public SpriteRenderer triggerSprite;
|
||||
public Collider triggerCollider;
|
||||
public NoteJudgeTriggerSubmodule noteJudgeTriggerSubmodule { get; set; }
|
||||
|
||||
public static JudgeTrigger GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName, bool isStatic)
|
||||
{
|
||||
JudgeTrigger judgeTrigger = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<JudgeTrigger>();
|
||||
return judgeTrigger;
|
||||
}
|
||||
|
||||
public override void SetDefaultSubmodules()
|
||||
{
|
||||
base.SetDefaultSubmodules();
|
||||
noteJudgeTriggerSubmodule = new NoteJudgeTriggerSubmodule(this);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
triggerSprite.color = IsMouseOver() ? Color.red : Color.white;
|
||||
}
|
||||
|
||||
private bool IsMouseOver()
|
||||
{
|
||||
//Raycast to check if mouse is over the object
|
||||
Ray ray = GameManager.instance.cameraManager.gameCamera.gameCamera.ScreenPointToRay(Mouse.current.position.ReadValue());
|
||||
if (Physics.Raycast(ray, out RaycastHit hit))
|
||||
{
|
||||
if (hit.collider == triggerCollider)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class JudgeTrigger_BM : EnvironmentObject_BM
|
||||
{
|
||||
public JudgeTrigger_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public JudgeTrigger_BM(string elementName, Guid elementGuid, List<string> tags,
|
||||
GameElement_BM parentElement, string themeBundleName, string objectName, bool isStatic) :
|
||||
base(elementName, elementGuid, tags, parentElement, themeBundleName, objectName, isStatic)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = JudgeTrigger.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName, isStatic);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return JudgeTrigger.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
parent, themeBundleName, objectName, isStatic);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a7a990728bad4e9ba201e72267e7eca
|
||||
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 Ichni.RhythmGame.ThemeBundles.Basic.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
public partial class PointLight : EnvironmentObject
|
||||
{
|
||||
[SerializeField]
|
||||
private Light pointLight;
|
||||
|
||||
public float intensity;
|
||||
public float range;
|
||||
public bool castShadows;
|
||||
|
||||
public static PointLight GenerateElement(string elementName, Guid id, List<string> tags,
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName,
|
||||
bool isStatic, float intensity, float range, bool castShadows)
|
||||
{
|
||||
PointLight poLight = EnvironmentObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement, isStatic).GetComponent<PointLight>();
|
||||
|
||||
poLight.intensity = intensity;
|
||||
poLight.range = range;
|
||||
poLight.castShadows = castShadows;
|
||||
return poLight;
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
base.Refresh();
|
||||
pointLight.color = colorSubmodule.currentBaseColor;
|
||||
pointLight.intensity = intensity;
|
||||
pointLight.range = range;
|
||||
pointLight.shadows = castShadows ? LightShadows.Soft : LightShadows.None;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class PointLight
|
||||
{
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new PointLight_BM(elementName, elementGuid, tags, parentElement.matchedBM as GameElement_BM,
|
||||
themeBundleName, objectName, isStatic, intensity, range, castShadows);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class PointLight_BM : EnvironmentObject_BM
|
||||
{
|
||||
public float intensity;
|
||||
public float range;
|
||||
public bool castShadows;
|
||||
|
||||
public PointLight_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public PointLight_BM(string elementName, Guid elementGuid, List<string> tags, GameElement_BM parentElement,
|
||||
string themeBundleName, string objectName, bool isStatic, float intensity, float range, bool castShadows)
|
||||
: base(elementName, elementGuid, tags, parentElement, themeBundleName, objectName, isStatic)
|
||||
{
|
||||
this.intensity = intensity;
|
||||
this.range = range;
|
||||
this.castShadows = castShadows;
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
matchedElement = PointLight.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName, isStatic, intensity, range, castShadows);
|
||||
}
|
||||
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
return PointLight.GenerateElement(elementName, Guid.NewGuid(), tags, false,
|
||||
parent, themeBundleName, objectName, isStatic, intensity, range, castShadows);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7e32cd989d5ff4f52b2b9ca2436698e6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/ThemeBundles/Basic/Scripts/NoteVisual.meta
Normal file
8
Assets/ThemeBundles/Basic/Scripts/NoteVisual.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f47e8122d7d54cb5a2369df5477daa1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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