Samurai Slice Gold Particles (#758)
* Beginning The first commit * End Finished adding Particle Effects, and some of the sprites were changed * hatred trying to solve conflicts * Just letting you all know Got access to this branch * re-parent wind * fix capitalization in enum --------- Co-authored-by: Obelisk <taynaluan10@gmail.com>
This commit is contained in:
parent
08ca876345
commit
da1e3f9ce1
|
@ -10452,7 +10452,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1114632065716707751
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -106943,6 +106943,7 @@ MonoBehaviour:
|
|||
BodyColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
HighlightColor: {r: 0.81, g: 0.81, b: 0.81, a: 1}
|
||||
ItemColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
StarColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
Word: {fileID: 8471847813194768760}
|
||||
currentBgEffect: 0
|
||||
BGPlane: {fileID: 5423016352081307686}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 538 KiB After Width: | Height: | Size: 500 KiB |
|
@ -64,6 +64,21 @@ namespace HeavenStudio.Games.Loaders
|
|||
new Param("valA", new EntityTypes.Integer(0, 30, 1), "Money", "Set the amount of coins the demon spills out when sliced."),
|
||||
}
|
||||
},
|
||||
new GameAction("particle effects", "Particle Effects")
|
||||
{
|
||||
function = delegate {
|
||||
var e = eventCaller.currentEntity;
|
||||
SamuraiSliceNtr.instance.SetParticleEffect(e.beat, e["type"], e["instant"], e["valA"], e["valB"]);
|
||||
},
|
||||
defaultLength = 0.5f,
|
||||
parameters = new List<Param>()
|
||||
{
|
||||
new Param("type", SamuraiSliceNtr.ParticleType.None, "Particle", "Set the type of particle effect to spawn. Using \"None\" will stop all effects."),
|
||||
new Param("instant", false, "Instant", "Toggle if the particles should start or stop instantly."),
|
||||
new Param("valA", new EntityTypes.Float(0f, 15f, 1f), "Wind Strength", "Set the strength of the particle wind."),
|
||||
new Param("valB", new EntityTypes.Float(1f, 25f, 1f), "Particle Intensity", "Set the intensity of the particle effect.")
|
||||
},
|
||||
},
|
||||
//backwards compatibility
|
||||
new GameAction("spawn object", "Toss Object")
|
||||
{
|
||||
|
@ -111,6 +126,15 @@ namespace HeavenStudio.Games
|
|||
None = 3
|
||||
}
|
||||
|
||||
public enum ParticleType
|
||||
{
|
||||
None,
|
||||
Cherry,
|
||||
Leaf,
|
||||
LeafBroken,
|
||||
Snow,
|
||||
}
|
||||
|
||||
[Header("References")]
|
||||
public NtrSamurai player;
|
||||
public GameObject launcher;
|
||||
|
@ -127,6 +151,11 @@ namespace HeavenStudio.Games
|
|||
public BezierCurve3D DebrisRightCurve;
|
||||
public BezierCurve3D NgDebrisCurve;
|
||||
|
||||
[Header("Particles")]
|
||||
// wind
|
||||
public WindZone Wind;
|
||||
public ParticleSystem[] Effects;
|
||||
|
||||
//game scene
|
||||
public static SamuraiSliceNtr instance;
|
||||
|
||||
|
@ -260,5 +289,27 @@ namespace HeavenStudio.Games
|
|||
|
||||
return mobjDat;
|
||||
}
|
||||
|
||||
public void SetParticleEffect(double beat, int type, bool instant, float windStrength, float particleStrength)
|
||||
{
|
||||
if (type == (int)ParticleType.None)
|
||||
{
|
||||
foreach (var eff in Effects) eff.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
ParticleSystem particleSystem = Effects[Mathf.Clamp(type - 1, 0, Effects.Length - 1)];
|
||||
|
||||
particleSystem.gameObject.SetActive(true);
|
||||
particleSystem.Play();
|
||||
|
||||
var emm = particleSystem.emission;
|
||||
var main = particleSystem.main;
|
||||
|
||||
emm.rateOverTime = particleStrength;
|
||||
main.prewarm = instant;
|
||||
|
||||
Wind.windMain = windStrength;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue