mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:47:39 +02:00
marching orders again??? (animation FULLY done! player "inputs")
last commit for now because i wanna start making a remix for a custom remix showcase that will meet the deadline on december 31st (?), dw ill come back after i finish this
This commit is contained in:
25
Assets/Scripts/Games/MarchingOrders/Cadet.cs
Normal file
25
Assets/Scripts/Games/MarchingOrders/Cadet.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using HeavenStudio.Util;
|
||||
|
||||
namespace HeavenStudio.Games.Scripts_MarchingOrders
|
||||
{
|
||||
public class Cadet : PlayerActionObject
|
||||
{
|
||||
public bool isSparkler;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/Games/MarchingOrders/Cadet.cs.meta
Normal file
11
Assets/Scripts/Games/MarchingOrders/Cadet.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4579598a91810594cbcd80bff4a2a033
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -82,6 +82,7 @@ namespace HeavenStudio.Games
|
||||
//code is just copied from other minigame code, i will polish them later
|
||||
[Header("References")]
|
||||
public Animator Sarge;
|
||||
public Animator Steam;
|
||||
public Animator Cadet1;
|
||||
public Animator Cadet2;
|
||||
public Animator Cadet3;
|
||||
@ -141,12 +142,12 @@ namespace HeavenStudio.Games
|
||||
if (cond.songPositionInBeats >= marching.startBeat && cond.songPositionInBeats < marching.startBeat + marching.length)
|
||||
{
|
||||
marchOtherCount += 1;
|
||||
var marchAnim = (marchOtherCount % 2 != 0 ? "MarchR" : "MarchL");
|
||||
var marchOtherAnim = (marchOtherCount % 2 != 0 ? "MarchR" : "MarchL");
|
||||
|
||||
Jukebox.PlayOneShotGame("marchingOrders/step1");
|
||||
Cadet1.DoScaledAnimationAsync(marchAnim, 0.5f);
|
||||
Cadet2.DoScaledAnimationAsync(marchAnim, 0.5f);
|
||||
Cadet3.DoScaledAnimationAsync(marchAnim, 0.5f);
|
||||
Cadet1.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
||||
Cadet2.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
||||
Cadet3.DoScaledAnimationAsync(marchOtherAnim, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,6 +155,13 @@ namespace HeavenStudio.Games
|
||||
{
|
||||
Jukebox.PlayOneShot("miss");
|
||||
Sarge.DoScaledAnimationAsync("Anger", 0.5f);
|
||||
Steam.DoScaledAnimationAsync("Steam", 0.5f);
|
||||
|
||||
marchPlayerCount += 1;
|
||||
var marchPlayerAnim = (marchPlayerCount % 2 != 0 ? "MarchR" : "MarchL");
|
||||
|
||||
Jukebox.PlayOneShotGame("marchingOrders/step1");
|
||||
CadetPlayer.DoScaledAnimationAsync(marchPlayerAnim, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user