launch party beginning
This commit is contained in:
parent
f7639c3a4f
commit
2c4427d343
File diff suppressed because it is too large
Load diff
BIN
Assets/Resources/Sprites/Games/LaunchParty/Background Stars.png
Normal file
BIN
Assets/Resources/Sprites/Games/LaunchParty/Background Stars.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
|
|
@ -0,0 +1,123 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 530c9c31e414ec44ebc6b4dd79f80263
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName: rvlrocket/common
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -107,30 +107,6 @@ namespace HeavenStudio.Games.Loaders
|
||||||
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Which ease should the Launch Pad use?")
|
new Param("ease", Util.EasingFunction.Ease.Linear, "Ease", "Which ease should the Launch Pad use?")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new GameAction("toggleStars", "Toggle Falling Stars")
|
|
||||||
{
|
|
||||||
function = delegate {var e = eventCaller.currentEntity; LaunchParty.instance.CreateParticles(e.beat, e["toggle"], e["valA"], e["valB"], e["valC"]);},
|
|
||||||
defaultLength = 0.5f,
|
|
||||||
parameters = new List<Param>()
|
|
||||||
{
|
|
||||||
new Param("toggle", true, "Stars Enabled", "Starfall Or No?", new List<Param.CollapseParam>()
|
|
||||||
{
|
|
||||||
new Param.CollapseParam((x, _) => (bool)x, new string[] { "valA", "valB", "valC"})
|
|
||||||
}),
|
|
||||||
new Param("valA", new EntityTypes.Float(0.1f, 10f, 1f), "Star Density", "How many stars are on the screen"),
|
|
||||||
new Param("valB", new EntityTypes.Float(0.01f, 5f, 0.1f), "Front Star Fall Speed", "How fast the front stars fall to the edge of the screen"),
|
|
||||||
new Param("valC", new EntityTypes.Float(0.01f, 5f, 0.1f), "Back Star Fall Speed", "How fast the stars fall to the edge of the screen")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
new GameAction("scrollSpeed", "Change Scroll Speed")
|
|
||||||
{
|
|
||||||
function = delegate {var e = eventCaller.currentEntity; LaunchParty.instance.UpdateScrollSpeed(e["speed"]); },
|
|
||||||
defaultLength = 0.5f,
|
|
||||||
parameters = new List<Param>()
|
|
||||||
{
|
|
||||||
new Param("speed", new EntityTypes.Float(0, 100, 0.5f), "Scroll Speed", "How fast will the background scroll down?"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
new List<string>() {"rvl", "normal"},
|
new List<string>() {"rvl", "normal"},
|
||||||
"rvlrocket", "en",
|
"rvlrocket", "en",
|
||||||
|
|
@ -152,14 +128,11 @@ namespace HeavenStudio.Games
|
||||||
[SerializeField] GameObject bowlingPin;
|
[SerializeField] GameObject bowlingPin;
|
||||||
|
|
||||||
[Header("Components")]
|
[Header("Components")]
|
||||||
[SerializeField] ParticleSystem fallingStars;
|
|
||||||
[SerializeField] ParticleSystem fallingStarsBack;
|
|
||||||
[SerializeField] Transform launchPad;
|
[SerializeField] Transform launchPad;
|
||||||
[SerializeField] Transform launchPadRotatable;
|
[SerializeField] Transform launchPadRotatable;
|
||||||
[SerializeField] Transform spawnPad;
|
[SerializeField] Transform spawnPad;
|
||||||
[SerializeField] Scroll scrollScript;
|
|
||||||
[SerializeField] Animator lensFlareAnim;
|
|
||||||
public Animator launchPadSpriteAnim;
|
public Animator launchPadSpriteAnim;
|
||||||
|
[SerializeField] private SpriteRenderer _bgWhiteOverlay;
|
||||||
|
|
||||||
[Header("Variables")]
|
[Header("Variables")]
|
||||||
private float currentRotBeat;
|
private float currentRotBeat;
|
||||||
|
|
@ -192,9 +165,11 @@ namespace HeavenStudio.Games
|
||||||
|
|
||||||
private int currentRotIndex;
|
private int currentRotIndex;
|
||||||
|
|
||||||
private List<RiqEntity> allPosEvents = new List<RiqEntity>();
|
private List<RiqEntity> allPosEvents = new();
|
||||||
|
|
||||||
private List<RiqEntity> allRotEvents = new List<RiqEntity>();
|
private List<RiqEntity> allRotEvents = new();
|
||||||
|
|
||||||
|
private List<RiqEntity> _allOverlayEvents = new();
|
||||||
|
|
||||||
public static LaunchParty instance;
|
public static LaunchParty instance;
|
||||||
|
|
||||||
|
|
@ -210,33 +185,16 @@ namespace HeavenStudio.Games
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
lensFlareAnim.Play("Flashing", 0, 0);
|
|
||||||
var posEvents = EventCaller.GetAllInGameManagerList("launchParty", new string[] { "posMove" });
|
|
||||||
List<RiqEntity> tempPosEvents = new List<RiqEntity>();
|
|
||||||
for (int i = 0; i < posEvents.Count; i++)
|
|
||||||
{
|
|
||||||
if (posEvents[i].beat + posEvents[i].beat >= Conductor.instance.songPositionInBeatsAsDouble)
|
|
||||||
{
|
|
||||||
tempPosEvents.Add(posEvents[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allPosEvents = tempPosEvents;
|
public override void OnGameSwitch(double beat)
|
||||||
|
|
||||||
var rotEvents = EventCaller.GetAllInGameManagerList("launchParty", new string[] { "rotMove" });
|
|
||||||
List<RiqEntity> tempRotEvents = new List<RiqEntity>();
|
|
||||||
for (int i = 0; i < rotEvents.Count; i++)
|
|
||||||
{
|
{
|
||||||
if (rotEvents[i].beat + rotEvents[i].beat >= Conductor.instance.songPositionInBeatsAsDouble)
|
HandleLaunchPadMoveEvents(beat);
|
||||||
{
|
|
||||||
tempRotEvents.Add(rotEvents[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allRotEvents = tempRotEvents;
|
public override void OnPlay(double beat)
|
||||||
|
{
|
||||||
UpdateLaunchPadPos();
|
HandleLaunchPadMoveEvents(beat);
|
||||||
UpdateLaunchPadRot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
|
|
@ -253,6 +211,31 @@ namespace HeavenStudio.Games
|
||||||
queuedRockets.Clear();
|
queuedRockets.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LaunchPadPositionAndRotationUpdate(cond);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateOverlay(Conductor cond)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Launch Pad Position and Rotation
|
||||||
|
|
||||||
|
private void HandleLaunchPadMoveEvents(double beat)
|
||||||
|
{
|
||||||
|
var posEvents = EventCaller.GetAllInGameManagerList("launchParty", new string[] { "posMove" });
|
||||||
|
allPosEvents = posEvents;
|
||||||
|
|
||||||
|
var rotEvents = EventCaller.GetAllInGameManagerList("launchParty", new string[] { "rotMove" });
|
||||||
|
allRotEvents = rotEvents;
|
||||||
|
|
||||||
|
UpdateLaunchPadPos();
|
||||||
|
UpdateLaunchPadRot();
|
||||||
|
LaunchPadPositionAndRotationUpdate(Conductor.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LaunchPadPositionAndRotationUpdate(Conductor cond)
|
||||||
|
{
|
||||||
if (allPosEvents.Count > 0)
|
if (allPosEvents.Count > 0)
|
||||||
{
|
{
|
||||||
if (currentPosIndex < allPosEvents.Count && currentPosIndex >= 0)
|
if (currentPosIndex < allPosEvents.Count && currentPosIndex >= 0)
|
||||||
|
|
@ -327,11 +310,6 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateScrollSpeed(float speed)
|
|
||||||
{
|
|
||||||
scrollScript.scrollSpeedY = speed * -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void UpdateLaunchPadPos()
|
private void UpdateLaunchPadPos()
|
||||||
{
|
{
|
||||||
if (currentPosIndex < allPosEvents.Count && currentPosIndex >= 0)
|
if (currentPosIndex < allPosEvents.Count && currentPosIndex >= 0)
|
||||||
|
|
@ -356,6 +334,10 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Rockets
|
||||||
|
|
||||||
public void SpawnRocket(double beat, float beatOffset, RocketType type, List<int> notes)
|
public void SpawnRocket(double beat, float beatOffset, RocketType type, List<int> notes)
|
||||||
{
|
{
|
||||||
GameObject rocketToSpawn = rocket;
|
GameObject rocketToSpawn = rocket;
|
||||||
|
|
@ -498,30 +480,7 @@ namespace HeavenStudio.Games
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateParticles(double beat, bool toggle, float starDensity, float starSpeed, float starSpeedBack)
|
#endregion
|
||||||
{
|
|
||||||
ParticleSystem.EmissionModule emm;
|
|
||||||
ParticleSystem.EmissionModule emm2;
|
|
||||||
switch (toggle)
|
|
||||||
{
|
|
||||||
case true:
|
|
||||||
var emmrate = fallingStars.velocityOverLifetime;
|
|
||||||
var emmrate2 = fallingStarsBack.velocityOverLifetime;
|
|
||||||
emmrate.speedModifier = starSpeed;
|
|
||||||
emmrate2.speedModifier = starSpeedBack;
|
|
||||||
emm = fallingStars.emission;
|
|
||||||
emm2 = fallingStarsBack.emission;
|
|
||||||
emm.rateOverTime = starDensity * 6f;
|
|
||||||
emm2.rateOverTime = starDensity * 6f;
|
|
||||||
fallingStars.Play();
|
|
||||||
fallingStarsBack.Play();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fallingStars.Stop();
|
|
||||||
fallingStarsBack.Stop();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue