Audio audio audio
This commit is contained in:
parent
5c5a9d2993
commit
32e9ccb46d
|
@ -127,6 +127,7 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
|
||||||
if (didActivate || didSpecial) {
|
if (didActivate || didSpecial) {
|
||||||
delayState = DelayState.Combo;
|
delayState = DelayState.Combo;
|
||||||
++Combo;
|
++Combo;
|
||||||
|
AudioProvider.Unk();
|
||||||
} else {
|
} else {
|
||||||
Combo = 0;
|
Combo = 0;
|
||||||
|
|
||||||
|
@ -169,10 +170,15 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
|
||||||
// TODO - Do a bunch of networking silliness to end the game here
|
// TODO - Do a bunch of networking silliness to end the game here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var dangerLevel = HighestStackWithTrash(board, incomingTrash);
|
||||||
|
if (dangerLevel > 9) {
|
||||||
|
AudioProvider.RequestFastMusic();
|
||||||
|
desiredAnimation = AnimationName.Sad;
|
||||||
|
}
|
||||||
|
|
||||||
// If the player isn't taking actions, trash won't appear, so make instakills kill through inaction
|
// If the player isn't taking actions, trash won't appear, so make instakills kill through inaction
|
||||||
if (timeInState > AutoDeathTime) {
|
if (timeInState > AutoDeathTime) {
|
||||||
var incomingHeight = HighestStackWithTrash(board, incomingTrash);
|
if (dangerLevel > ROW) {
|
||||||
if (incomingHeight > ROW) {
|
|
||||||
ApplyTrash();
|
ApplyTrash();
|
||||||
} else {
|
} else {
|
||||||
timeInState = 0; // Reset the time in state before we check autodeath again
|
timeInState = 0; // Reset the time in state before we check autodeath again
|
||||||
|
@ -263,6 +269,8 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
|
||||||
|
|
||||||
|
|
||||||
public BoardState DropNow(BoardState bs) {
|
public BoardState DropNow(BoardState bs) {
|
||||||
|
AudioProvider.Unk();
|
||||||
|
|
||||||
bs = Place(bs, currentPair, playerRotation, dropColumn);
|
bs = Place(bs, currentPair, playerRotation, dropColumn);
|
||||||
//this[dropColumn, dropHeight] = TileInfo.CreateRandomBlockTile();
|
//this[dropColumn, dropHeight] = TileInfo.CreateRandomBlockTile();
|
||||||
bs = ReduceCountdowns(bs);
|
bs = ReduceCountdowns(bs);
|
||||||
|
@ -453,6 +461,7 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
|
||||||
int trashCursorHead = 0;
|
int trashCursorHead = 0;
|
||||||
void ApplyTrash() {
|
void ApplyTrash() {
|
||||||
if (incomingTrash > 0) {
|
if (incomingTrash > 0) {
|
||||||
|
AudioProvider.Bunk();
|
||||||
delayState = DelayState.Collapse;
|
delayState = DelayState.Collapse;
|
||||||
timeInState = 0;
|
timeInState = 0;
|
||||||
}
|
}
|
||||||
|
@ -704,6 +713,13 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
|
||||||
|
|
||||||
lastActivatorColor = TileInfo.CreateRandomActivatorTile().color;
|
lastActivatorColor = TileInfo.CreateRandomActivatorTile().color;
|
||||||
|
|
||||||
|
// Texel - Ooops we forgot to clear these
|
||||||
|
trashCursorHead = 0;
|
||||||
|
incomingTrash = 0;
|
||||||
|
score = 0;
|
||||||
|
|
||||||
|
render.NickNameText.text = ""; // Clear the nickname text to prevent multi->arcade corruption
|
||||||
|
|
||||||
nextActivator = TilesUntilActivator;
|
nextActivator = TilesUntilActivator;
|
||||||
nextSpecial = ActivatorsUntilSpecial;
|
nextSpecial = ActivatorsUntilSpecial;
|
||||||
delayState = DelayState.None;
|
delayState = DelayState.None;
|
||||||
|
@ -930,7 +946,7 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
|
||||||
if (!AIEnabled)
|
if (!AIEnabled)
|
||||||
yield return new WaitUntil(() => AIEnabled);
|
yield return new WaitUntil(() => AIEnabled);
|
||||||
var (r, c) = GetBestMove(board);
|
var (r, c) = GetBestMove(board);
|
||||||
Debug.LogFormat("AI: Column {0}, Rotation {1}", c, r);
|
//Debug.LogFormat("AI: Column {0}, Rotation {1}", c, r);
|
||||||
totalMoves += 1;
|
totalMoves += 1;
|
||||||
|
|
||||||
// First match rotation
|
// First match rotation
|
||||||
|
|
Loading…
Reference in New Issue