Added more radio music, based on dungeon variant.
Redid vent code to work better and like work in general. Knight animation now pauses for a second. Knights no longer trigger the default scarlet vent animation. Revenants now spawn at a vent if no knights exist.
This commit is contained in:
parent
e28f3ca2db
commit
f37cded831
14 changed files with 285 additions and 114 deletions
|
@ -41,12 +41,19 @@ namespace ScarletMansion.GamePatch.Components {
|
|||
|
||||
void Start() {
|
||||
audioSource.volume = maxVolume * (volume * 0.1f);
|
||||
|
||||
var inst = ScarletGenericManager.Instance;
|
||||
if (inst) {
|
||||
audioClips = inst.radioAudioClips;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnNetworkSpawn() {
|
||||
if (IsOwner) {
|
||||
ToggleOnOffSwitchClientRpc(UnityEngine.Random.value > 0.9f);
|
||||
ToggleVolumeSwitchClientRpc(UnityEngine.Random.Range(3, 7));
|
||||
|
||||
if (audioClips.Length == 0) return;
|
||||
ToggleSongSwitchClientRpc(UnityEngine.Random.Range(0, audioClips.Length));
|
||||
}
|
||||
}
|
||||
|
@ -112,6 +119,8 @@ namespace ScarletMansion.GamePatch.Components {
|
|||
|
||||
[ServerRpc(RequireOwnership = false)]
|
||||
public void ToggleSongSwitchServerRpc(){
|
||||
if (audioClips.Length == 0) return;
|
||||
|
||||
ToggleSongSwitchClientRpc((audioIndex + 1) % audioClips.Length);
|
||||
treasureRoomEvent?.UpdateTreasureDoorStatus();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue