Audio audio audio
This commit is contained in:
		
							parent
							
								
									5c5a9d2993
								
							
						
					
					
						commit
						32e9ccb46d
					
				
					 1 changed files with 19 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -127,6 +127,7 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
 | 
			
		|||
					if (didActivate || didSpecial) {
 | 
			
		||||
						delayState = DelayState.Combo;
 | 
			
		||||
						++Combo;
 | 
			
		||||
						AudioProvider.Unk();
 | 
			
		||||
					} else {
 | 
			
		||||
						Combo = 0;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -169,10 +170,15 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
 | 
			
		|||
					// 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 (timeInState > AutoDeathTime) {
 | 
			
		||||
					var incomingHeight = HighestStackWithTrash(board, incomingTrash);
 | 
			
		||||
					if (incomingHeight > ROW) {
 | 
			
		||||
					if (dangerLevel > ROW) {
 | 
			
		||||
						ApplyTrash();
 | 
			
		||||
					} else {
 | 
			
		||||
						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) {
 | 
			
		||||
		AudioProvider.Unk();
 | 
			
		||||
 | 
			
		||||
		bs = Place(bs, currentPair, playerRotation, dropColumn);
 | 
			
		||||
		//this[dropColumn, dropHeight] = TileInfo.CreateRandomBlockTile();
 | 
			
		||||
		bs = ReduceCountdowns(bs);
 | 
			
		||||
| 
						 | 
				
			
			@ -453,6 +461,7 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
 | 
			
		|||
	int trashCursorHead = 0;
 | 
			
		||||
	void ApplyTrash() {
 | 
			
		||||
		if (incomingTrash > 0) {
 | 
			
		||||
			AudioProvider.Bunk();
 | 
			
		||||
			delayState = DelayState.Collapse;
 | 
			
		||||
			timeInState = 0;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			@ -704,6 +713,13 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
 | 
			
		|||
 | 
			
		||||
		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;
 | 
			
		||||
		nextSpecial = ActivatorsUntilSpecial;
 | 
			
		||||
    delayState = DelayState.None;
 | 
			
		||||
| 
						 | 
				
			
			@ -930,7 +946,7 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
 | 
			
		|||
			if (!AIEnabled)
 | 
			
		||||
				yield return new WaitUntil(() => AIEnabled);
 | 
			
		||||
			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;
 | 
			
		||||
 | 
			
		||||
			// First match rotation
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue