架构重新设计
基本重做了所有物体和次级模块代码
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
@@ -50,5 +52,31 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new Beatmap.BasicNoteBadExpand_BM(effectTime, note.elementGuid);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteBadExpand_BM : NoteEffectBase_BM
|
||||
{
|
||||
public BasicNoteBadExpand_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteBadExpand_BM(float effectTime, Guid attachedNoteID) : base(effectTime, attachedNoteID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType()
|
||||
{
|
||||
return new BasicNoteBadExpand(GameElement_BM.GetElement(attachedNoteID) as NoteBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
@@ -52,5 +54,33 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new Beatmap.BasicNoteGenerateExpand_BM(effectTime, generateTime, note.elementGuid);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteGenerateExpand_BM : NoteEffectBase_BM
|
||||
{
|
||||
public float generateTime;
|
||||
|
||||
public BasicNoteGenerateExpand_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteGenerateExpand_BM(float effectTime, float generateTime, Guid attachedNoteID) : base(effectTime, attachedNoteID)
|
||||
{
|
||||
this.generateTime = generateTime;
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType()
|
||||
{
|
||||
return new BasicNoteGenerateExpand(GameElement_BM.GetElement(attachedNoteID) as NoteBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
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
|
||||
@@ -54,5 +57,31 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new BasicNoteGoodBurst_BM(effectTime, note.elementGuid);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteGoodBurst_BM : NoteEffectBase_BM
|
||||
{
|
||||
public BasicNoteGoodBurst_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteGoodBurst_BM(float effectTime, Guid attachedNoteID) : base(effectTime, attachedNoteID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType()
|
||||
{
|
||||
return new BasicNoteGoodBurst(GameElement_BM.GetElement(attachedNoteID) as NoteBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
@@ -51,5 +53,31 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new Beatmap.BasicNoteMissPale_BM(effectTime, note.elementGuid);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNoteMissPale_BM : NoteEffectBase_BM
|
||||
{
|
||||
public BasicNoteMissPale_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteMissPale_BM(float effectTime, Guid elementGuid) : base(effectTime, elementGuid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType()
|
||||
{
|
||||
return new BasicNoteMissPale(GameElement_BM.GetElement(attachedNoteID) as NoteBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
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
|
||||
@@ -23,7 +26,7 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
effectRing.GetComponent<SpriteRenderer>().color = Color.white;
|
||||
noteVisual.noteMain.SetActive(true);
|
||||
}
|
||||
|
||||
|
||||
public override void Adjust()
|
||||
{
|
||||
effectRing.gameObject.SetActive(true);
|
||||
@@ -54,5 +57,31 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
|
||||
return EffectState.Error;
|
||||
}
|
||||
|
||||
public override EffectBase_BM ConvertToBM()
|
||||
{
|
||||
return new BasicNotePerfectBurst_BM(effectTime, note.elementGuid);
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
{
|
||||
public class BasicNotePerfectBurst_BM : NoteEffectBase_BM
|
||||
{
|
||||
public BasicNotePerfectBurst_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNotePerfectBurst_BM(float effectTime, Guid attachedNoteID) : base(effectTime, attachedNoteID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override EffectBase ConvertToGameType()
|
||||
{
|
||||
return new BasicNotePerfectBurst(GameElement_BM.GetElement(attachedNoteID) as NoteBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,25 +10,23 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
public partial class BasicNoteVisual : NoteVisualBase
|
||||
{
|
||||
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)
|
||||
bool isFirstGenerated, GameElement parentElement, string themeBundleName, string objectName)
|
||||
{
|
||||
BasicNoteVisual noteVisual = SubstantialObject
|
||||
.GenerateElement(elementName, id, tags, themeBundleName, objectName, position, eulerAngles, scale, parent, isFirstGenerated)
|
||||
.GetComponent<BasicNoteVisual>();
|
||||
BasicNoteVisual noteVisual = SubstantialObject.GenerateElement(elementName, id, tags,
|
||||
isFirstGenerated, themeBundleName, objectName, parentElement).GetComponent<BasicNoteVisual>();
|
||||
|
||||
NoteBase note = parent as NoteBase;
|
||||
NoteBase note = parentElement as NoteBase;
|
||||
if(note == null) throw new System.Exception("NoteVisual只能生成在Note下。");
|
||||
noteVisual.note = note;
|
||||
note.noteVisual = noteVisual;
|
||||
|
||||
if (isFirstGenerated)
|
||||
{
|
||||
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));
|
||||
note.effectSubmodule.effectCollection["Generate"].Add(new BasicNoteGenerateExpand(noteVisual.note));
|
||||
note.effectSubmodule.effectCollection["Perfect"].Add(new BasicNotePerfectBurst(noteVisual.note));
|
||||
note.effectSubmodule.effectCollection["Good"].Add(new BasicNoteGoodBurst(noteVisual.note));
|
||||
note.effectSubmodule.effectCollection["Bad"].Add(new BasicNoteBadExpand(noteVisual.note));
|
||||
note.effectSubmodule.effectCollection["Miss"].Add(new BasicNoteMissPale(noteVisual.note));
|
||||
}
|
||||
|
||||
return noteVisual;
|
||||
@@ -39,43 +37,35 @@ namespace Ichni.RhythmGame.ThemeBundles.Basic
|
||||
{
|
||||
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 : BaseElement_BM
|
||||
public class BasicNoteVisual_BM : SubstantialObject_BM
|
||||
{
|
||||
public BasicNoteVisual_BM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BasicNoteVisual_BM(string elementName, Guid id, List<string> tags, BaseElement_BM parent,
|
||||
string themeBundleName, string objectName, Vector3 position, Vector3 eulerAngles, Vector3 scale) :
|
||||
base(elementName, id, tags, parent)
|
||||
public BasicNoteVisual_BM(string elementName, Guid id, List<string> tags,
|
||||
GameElement_BM parent, string themeBundleName, string objectName) :
|
||||
base(elementName, id, tags, parent, themeBundleName, objectName)
|
||||
{
|
||||
this.elementName = elementName;
|
||||
this.elementGuid = id;
|
||||
this.tags = tags;
|
||||
// this.themeBundleName = themeBundleName;
|
||||
// this.objectName = objectName;
|
||||
// this.position = position;
|
||||
// this.eulerAngles = eulerAngles;
|
||||
// this.scale = scale;
|
||||
// this.parent = parent;
|
||||
|
||||
}
|
||||
|
||||
public override void ExecuteBM()
|
||||
{
|
||||
//TODO: 生成NoteVisual
|
||||
matchedElement = BasicNoteVisual.GenerateElement(elementName, elementGuid, tags, false,
|
||||
GetElement(attachedElementGuid), themeBundleName, objectName);
|
||||
}
|
||||
|
||||
public override BaseElement DuplicateBM(BaseElement parent)
|
||||
public override GameElement DuplicateBM(GameElement parent)
|
||||
{
|
||||
//TODO: 生成NoteVisual
|
||||
return null;
|
||||
return BasicNoteVisual.GenerateElement(elementName, elementGuid, tags, false, parent, themeBundleName, objectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user