Added intermission1
This commit is contained in:
@@ -21,6 +21,7 @@ namespace Marro.PacManUdon
|
||||
[SerializeField] private PelletManager pelletManager;
|
||||
[SerializeField] public StatusDisplay statusDisplay; // This one is public so other scripts can write to the debug display
|
||||
[SerializeField] private PelletManager attractScreen;
|
||||
[SerializeField] private GameObject intermissionScreen;
|
||||
[SerializeField] private GameObject pressStartButtonScreen;
|
||||
[SerializeField] private PlayerInput playerInput;
|
||||
[SerializeField] private Animator demo;
|
||||
@@ -42,6 +43,7 @@ namespace Marro.PacManUdon
|
||||
private int pelletCountTotal;
|
||||
private int pelletCountRemaining;
|
||||
private GameObject[] attractScreenElements;
|
||||
private GameObject[] intermissionScreenElements;
|
||||
|
||||
[UdonSynced, FieldChangeCallback(nameof(GameState))] private PacManGameState gameState;
|
||||
[UdonSynced, FieldChangeCallback(nameof(Score))] private int score;
|
||||
@@ -54,12 +56,19 @@ namespace Marro.PacManUdon
|
||||
maze = mazes[0];
|
||||
pelletPool = maze.pelletContainer.GetComponent<VRCObjectPool>();
|
||||
mazeSpriteAnimator = maze.mazeSprite.GetComponent<Animator>();
|
||||
|
||||
attractScreenElements = new GameObject[attractScreen.transform.childCount];
|
||||
for (int i = 0; i < attractScreenElements.Length; i++)
|
||||
{
|
||||
attractScreenElements[i] = attractScreen.transform.GetChild(i).gameObject;
|
||||
}
|
||||
|
||||
intermissionScreenElements = new GameObject[intermissionScreen.transform.childCount];
|
||||
for (int i = 0; i < intermissionScreenElements.Length; i++)
|
||||
{
|
||||
intermissionScreenElements[i] = intermissionScreen.transform.GetChild(i).gameObject;
|
||||
}
|
||||
|
||||
ghostManager.Initialize(maze.ghostTargets, pacMan, this);
|
||||
pacMan.Initialize(playerInput, pelletPool, this);
|
||||
bonusFruit.Initialize();
|
||||
@@ -114,7 +123,7 @@ namespace Marro.PacManUdon
|
||||
if (Networking.IsOwner(gameObject))
|
||||
{
|
||||
Debug.Log($"{gameObject} Start demo button pressed!");
|
||||
StartTimeSequence(PacManTimeSequence.AttractScreenDemo);
|
||||
StartTimeSequence(PacManTimeSequence.Intermission1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -610,6 +619,9 @@ namespace Marro.PacManUdon
|
||||
case PacManTimeSequence.GameOver:
|
||||
TimeSequenceStepGameOver(sequenceProgress);
|
||||
break;
|
||||
case PacManTimeSequence.Intermission1:
|
||||
TimeSequenceStepIntermission1(sequenceProgress);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -622,7 +634,7 @@ namespace Marro.PacManUdon
|
||||
return new float[0];
|
||||
case PacManTimeSequence.AttractScreenIntroduction:
|
||||
return DeltaToAbsolute(new float[] { 0, 0.032f, 1f, 1f, .5f, .5f, 1f, .5f, .5f, 1f, .5f, .5f, 1f, .5f, 1f, 1f, 1f,
|
||||
5f, 0.2f, 2f, 0.91667f, 2f, 0.91667f, 2f, 0.91667f, 2f, 0.91667f });
|
||||
5f, 0.2f, 2f, 0.91667f, 2f, 0.91667f, 2f, 0.91667f, 2f, 0.91667f });
|
||||
case PacManTimeSequence.AttractScreenDemo:
|
||||
return DeltaToAbsolute(new float[] { 0, 0.016f, 0.05f, 0.16f, 0.33f, 1.85f, 54f });
|
||||
case PacManTimeSequence.WaitForStart:
|
||||
@@ -643,6 +655,8 @@ namespace Marro.PacManUdon
|
||||
return DeltaToAbsolute(new float[] { 0, 0.016f, 0.064f, 0.032f, 1.85f, 0.016f });
|
||||
case PacManTimeSequence.GameOver:
|
||||
return DeltaToAbsolute(new float[] { 0, 1.95f });
|
||||
case PacManTimeSequence.Intermission1:
|
||||
return DeltaToAbsolute(new float[] { 0, 0.316f, 4.26f, 2.15f, 4.03f });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -551,6 +551,7 @@ namespace Marro.PacManUdon
|
||||
void UpdateSpeed()
|
||||
{
|
||||
speed = ghostManager.GetTargetSpeed(this, ghostState, isScared, inTunnel);
|
||||
Debug.Log($"Ghost updated speed to {speed}, level: {ghostManager.elroyLevel}");
|
||||
}
|
||||
|
||||
public void ResetHousePelletCounter()
|
||||
@@ -634,7 +635,7 @@ namespace Marro.PacManUdon
|
||||
}
|
||||
}
|
||||
|
||||
public void SetScared(bool scared)
|
||||
private void SetScared(bool scared)
|
||||
{
|
||||
isScared = scared;
|
||||
UpdateAnimator();
|
||||
|
||||
@@ -43,7 +43,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 32
|
||||
Data: 33
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -1291,7 +1291,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 62|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
@@ -1652,6 +1652,54 @@ MonoBehaviour:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: kinematic
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 78|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: kinematic
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 35
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 35
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 79|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
private int scatterPatternIndex;
|
||||
|
||||
// Elroy logic
|
||||
private int elroyLevel;
|
||||
public int elroyLevel;
|
||||
private int pelletsRemaining;
|
||||
|
||||
// Ghost house logic
|
||||
@@ -55,6 +55,7 @@
|
||||
private float pelletTimeoutLimit;
|
||||
|
||||
private bool frozen;
|
||||
private bool kinematic;
|
||||
|
||||
// This should be called once when the game is initialized
|
||||
public void Initialize(GameObject[] ghostTargets, PacMan pacMan, GameManager gameController)
|
||||
@@ -83,6 +84,8 @@
|
||||
sharedPelletCounter = 0;
|
||||
pelletTimeout = 0;
|
||||
elroyLevel = 0;
|
||||
frozen = false;
|
||||
kinematic = false;
|
||||
|
||||
foreach (Ghost ghost in ghosts)
|
||||
{
|
||||
@@ -110,7 +113,7 @@
|
||||
public void FixedUpdate()
|
||||
{
|
||||
// gameStateManager.statusDisplay.SetDebugText(1, this.blinkCountdown.ToString());
|
||||
if (frozen)
|
||||
if (frozen || kinematic)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -310,6 +313,7 @@
|
||||
|
||||
public void SetLevel(int level)
|
||||
{
|
||||
Debug.Log($"GhostManager: SetLevel {level}");
|
||||
speedDefault = PacManConstants.GetGhostDefaultSpeedForLevel(level);
|
||||
speedScared = PacManConstants.GetGhostScaredSpeedForLevel(level);
|
||||
speedReturn = 15f;
|
||||
@@ -471,6 +475,7 @@
|
||||
|
||||
public void SetKinematic(bool kinematic)
|
||||
{
|
||||
this.kinematic = kinematic;
|
||||
foreach (Ghost ghost in ghosts)
|
||||
{
|
||||
ghost.SetKinematic(kinematic);
|
||||
|
||||
@@ -34,6 +34,17 @@
|
||||
[UdonSynced] private float freezeSeconds;
|
||||
[UdonSynced] private bool frozen;
|
||||
|
||||
#region Animator constants
|
||||
private const string AnimatorKeyDead = "Dead";
|
||||
private const string AnimatorKeyDirection = "Direction";
|
||||
private const float AnimatorDirectionNone = 0f;
|
||||
private const float AnimatorDirectionRight = 0.25f;
|
||||
private const float AnimatorDirectionLeft = 0.50f;
|
||||
private const float AnimatorDirectionUp = 0.75f;
|
||||
private const float AnimatorDirectionDown = 1f;
|
||||
private const float AnimatorDirectionRightBig = 1.25f;
|
||||
#endregion
|
||||
|
||||
|
||||
public void Initialize(PlayerInput input, VRCObjectPool pelletPool, GameManager gameController)
|
||||
{
|
||||
@@ -202,7 +213,7 @@
|
||||
if (!gameObject.activeInHierarchy)
|
||||
return;
|
||||
|
||||
animator.SetBool("Dead", dead);
|
||||
animator.SetBool(AnimatorKeyDead, dead);
|
||||
if (dead)
|
||||
{
|
||||
animator.speed = 1;
|
||||
@@ -211,7 +222,7 @@
|
||||
|
||||
if (frozen || direction.Equals(Vector2.zero))
|
||||
{
|
||||
animator.SetFloat("Direction", 0f);
|
||||
animator.SetFloat(AnimatorKeyDirection, AnimatorDirectionNone);
|
||||
animator.speed = 0;
|
||||
}
|
||||
else
|
||||
@@ -219,31 +230,23 @@
|
||||
animator.speed = 1;
|
||||
if (targetDirection.Equals(Vector2.right))
|
||||
{
|
||||
animator.SetFloat("Direction", 0.25f);
|
||||
animator.SetFloat(AnimatorKeyDirection, AnimatorDirectionRight);
|
||||
}
|
||||
else if (targetDirection.Equals(Vector2.left))
|
||||
{
|
||||
animator.SetFloat("Direction", 0.5f);
|
||||
animator.SetFloat(AnimatorKeyDirection, AnimatorDirectionLeft);
|
||||
}
|
||||
else if (targetDirection.Equals(Vector2.up))
|
||||
{
|
||||
animator.SetFloat("Direction", 0.75f);
|
||||
animator.SetFloat(AnimatorKeyDirection, AnimatorDirectionUp);
|
||||
}
|
||||
else if (targetDirection.Equals(Vector2.down))
|
||||
{
|
||||
animator.SetFloat("Direction", 1f);
|
||||
animator.SetFloat(AnimatorKeyDirection, AnimatorDirectionDown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// public Vector2 GetTarget(Vector2 gridPosition, Vector2 currentDirection) {
|
||||
// Vector2 nextDirection = input.GetRotatedDirection();
|
||||
// if(!nextDirection.Equals(currentDirection) && !GridMoverTools.CheckCollisionInDirection(transform, gridPosition, nextDirection)) {
|
||||
// return nextDirection;
|
||||
// }
|
||||
// return Vector2.zero;
|
||||
// }
|
||||
|
||||
public void SetDead(bool dead)
|
||||
{
|
||||
this.dead = dead;
|
||||
@@ -303,6 +306,11 @@
|
||||
predefinedPathIndex = 0;
|
||||
}
|
||||
|
||||
public void BecomeBig()
|
||||
{
|
||||
animator.SetFloat(AnimatorKeyDirection, AnimatorDirectionRightBig);
|
||||
}
|
||||
|
||||
void SetVisibility(bool visible)
|
||||
{
|
||||
renderer.enabled = visible;
|
||||
|
||||
@@ -42,7 +42,10 @@ namespace Marro.PacManUdon
|
||||
GhostCaught,
|
||||
PacManCaught,
|
||||
RestartLevel,
|
||||
GameOver
|
||||
GameOver,
|
||||
Intermission1,
|
||||
Intermission2,
|
||||
Intermission3
|
||||
}
|
||||
|
||||
public static class PacManConstants
|
||||
|
||||
@@ -86,15 +86,15 @@ namespace Marro.PacManUdon
|
||||
attractScreenElements[14].SetActive(true);
|
||||
attractScreenElements[15].SetActive(true);
|
||||
|
||||
pacMan.SetLevel(1);
|
||||
pacMan.Reset();
|
||||
pacMan.SetLevel(1);
|
||||
pacMan.SetKinematic(true);
|
||||
pacMan.SetActive(true);
|
||||
pacMan.SetPosition(attractScreenElements[16].transform.localPosition);
|
||||
pacMan.SetDirection(Vector2.left);
|
||||
|
||||
ghostManager.SetLevel(2);
|
||||
ghostManager.Reset();
|
||||
ghostManager.SetLevel(2);
|
||||
ghostManager.SetKinematic(true);
|
||||
ghostManager.SetActive(true);
|
||||
Ghost[] ghosts = ghostManager.Ghosts;
|
||||
|
||||
64
Assets/Scripts/Sequences/Intermission1.cs
Normal file
64
Assets/Scripts/Sequences/Intermission1.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Marro.PacManUdon
|
||||
{
|
||||
public partial class GameManager
|
||||
{
|
||||
private void TimeSequenceStepIntermission1(int sequenceProgress)
|
||||
{
|
||||
var blinky = ghostManager.Ghosts[0];
|
||||
|
||||
switch (sequenceProgress)
|
||||
{
|
||||
case 0:
|
||||
// Show just level display
|
||||
RestartLevel();
|
||||
statusDisplay.SetLevelDisplayVisible(true);
|
||||
break;
|
||||
case 1:
|
||||
// Start animation, blinky chasing pacman
|
||||
soundManager.SuppressSound(false);
|
||||
soundManager.StartIntermissionSound();
|
||||
pacMan.Reset();
|
||||
pacMan.SetLevel(4);
|
||||
pacMan.SetPowerPellet(false); // Update speed
|
||||
pacMan.SetKinematic(true);
|
||||
pacMan.SetActive(true);
|
||||
pacMan.SetPosition(intermissionScreenElements[0].transform.localPosition);
|
||||
pacMan.SetDirection(Vector2.left);
|
||||
|
||||
ghostManager.Reset();
|
||||
ghostManager.SetLevel(5);
|
||||
ghostManager.SetKinematic(true);
|
||||
ghostManager.gameObject.SetActive(true);
|
||||
blinky.SetElroy(2);
|
||||
blinky.SetPosition(intermissionScreenElements[1].transform.localPosition);
|
||||
blinky.SetDirection(Vector2.left);
|
||||
blinky.SetState(PacManGhostState.Normal);
|
||||
blinky.SetActive(true);
|
||||
SetFrozen(false);
|
||||
break;
|
||||
case 2:
|
||||
// Reached end, make ghost scared and turn around
|
||||
blinky.BecomeScared();
|
||||
blinky.SetPosition(intermissionScreenElements[3].transform.localPosition);
|
||||
pacMan.SetDirection(Vector2.zero);
|
||||
pacMan.SetPosition(intermissionScreenElements[2].transform.localPosition);
|
||||
pacMan.SetPowerPellet(true);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
// Pacman starts changing ghosts
|
||||
pacMan.SetDirection(Vector2.right);
|
||||
pacMan.BecomeBig();
|
||||
break;
|
||||
case 4:
|
||||
// End cutscene
|
||||
soundManager.StopAllSound();
|
||||
SetFrozen(true);
|
||||
StartTimeSequence(PacManTimeSequence.StartNewLevel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Sequences/Intermission1.cs.meta
Normal file
11
Assets/Scripts/Sequences/Intermission1.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 343ec2edec89234428ef86d00b0c6430
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -43,7 +43,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 24
|
||||
Data: 25
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -277,13 +277,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacDot1
|
||||
Data: intermission
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacDot1
|
||||
Data: intermission
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -331,13 +331,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacDot2
|
||||
Data: pacDot1
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacDot2
|
||||
Data: pacDot1
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -385,13 +385,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacDie1
|
||||
Data: pacDot2
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 22|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacDie1
|
||||
Data: pacDot2
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -439,13 +439,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacFruit
|
||||
Data: pacDie1
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 25|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacFruit
|
||||
Data: pacDie1
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -493,13 +493,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacCoin
|
||||
Data: pacFruit
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 28|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacCoin
|
||||
Data: pacFruit
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -547,13 +547,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacGhostEat
|
||||
Data: pacCoin
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacGhostEat
|
||||
Data: pacCoin
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -601,13 +601,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacGhostBlue
|
||||
Data: pacGhostEat
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacGhostBlue
|
||||
Data: pacGhostEat
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -655,13 +655,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacGhostRetreat
|
||||
Data: pacGhostBlue
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacGhostRetreat
|
||||
Data: pacGhostBlue
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -709,13 +709,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: pacExtraLife
|
||||
Data: pacGhostRetreat
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: pacExtraLife
|
||||
Data: pacGhostRetreat
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -763,13 +763,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: siren0
|
||||
Data: pacExtraLife
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: siren0
|
||||
Data: pacExtraLife
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -817,13 +817,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: siren1
|
||||
Data: siren0
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 46|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: siren1
|
||||
Data: siren0
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -871,13 +871,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: siren2
|
||||
Data: siren1
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: siren2
|
||||
Data: siren1
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -925,13 +925,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: siren3
|
||||
Data: siren2
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 52|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: siren3
|
||||
Data: siren2
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -979,13 +979,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: siren4
|
||||
Data: siren3
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 55|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: siren4
|
||||
Data: siren3
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -1033,13 +1033,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _nextDotSound
|
||||
Data: siren4
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 58|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _nextDotSound
|
||||
Data: siren4
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
@@ -1057,13 +1057,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 59|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 60|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
@@ -1081,25 +1087,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ghostRetreating
|
||||
Data: _nextDotSound
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 61|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ghostRetreating
|
||||
Data: _nextDotSound
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 61|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
Entry: 9
|
||||
Data: 13
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 61
|
||||
Data: 13
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1135,19 +1135,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ghostBlue
|
||||
Data: _ghostRetreating
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 63|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ghostBlue
|
||||
Data: _ghostRetreating
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 61
|
||||
Entry: 7
|
||||
Data: 64|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 61
|
||||
Data: 64
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1162,7 +1168,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 64|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 65|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -1183,25 +1189,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _ghostSoundLevel
|
||||
Data: _ghostBlue
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 65|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 66|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ghostSoundLevel
|
||||
Data: _ghostBlue
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 66|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Int32, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
Entry: 9
|
||||
Data: 64
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 66
|
||||
Data: 64
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1237,19 +1237,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _currentlyPlayingSiren
|
||||
Data: _ghostSoundLevel
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 68|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _currentlyPlayingSiren
|
||||
Data: _ghostSoundLevel
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 61
|
||||
Entry: 7
|
||||
Data: 69|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Int32, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 61
|
||||
Data: 69
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1264,7 +1270,55 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 69|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 70|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _currentlyPlayingSiren
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 71|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _currentlyPlayingSiren
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 64
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 64
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 72|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -1288,16 +1342,16 @@ MonoBehaviour:
|
||||
Data: _suppress
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 70|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 73|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _suppress
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 61
|
||||
Data: 64
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 61
|
||||
Data: 64
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -1312,7 +1366,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 71|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 74|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@@ -11,6 +11,8 @@ public class SoundManager : UdonSharpBehaviour
|
||||
[SerializeField] private AudioSource audioSourceExtraLife;
|
||||
|
||||
[SerializeField] private AudioClip pacStart;
|
||||
[SerializeField] private AudioClip intermission;
|
||||
|
||||
[SerializeField] private AudioClip pacDot1;
|
||||
[SerializeField] private AudioClip pacDot2;
|
||||
[SerializeField] private AudioClip pacDie1;
|
||||
@@ -69,6 +71,11 @@ public class SoundManager : UdonSharpBehaviour
|
||||
PlaySound(audioSourcePacMan, pacStart);
|
||||
}
|
||||
|
||||
public void StartIntermissionSound()
|
||||
{
|
||||
PlaySound(audioSourcePacMan, intermission, true);
|
||||
}
|
||||
|
||||
public void PlayPelletSound()
|
||||
{
|
||||
PlaySound(audioSourcePacMan, _nextDotSound);
|
||||
|
||||
Reference in New Issue
Block a user