conflict for some reason?

This commit is contained in:
LadyEbony 2020-08-22 04:37:15 -07:00
parent a34c980130
commit 3eb34cc85d
12 changed files with 475 additions and 66 deletions

View file

@ -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
@ -959,4 +975,4 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
Debug.LogFormat("AI lost after {0} moves",totalMoves);
}
#endregion
}
}

View file

@ -9813,7 +9813,6 @@ RectTransform:
- {fileID: 1237100308}
- {fileID: 1443456799}
- {fileID: 1649114570}
- {fileID: 2206978438437783445}
m_Father: {fileID: 1736330635070797289}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -11339,67 +11338,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
option: 0
--- !u!1 &7887297673964724319
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2206978438437783445}
- component: {fileID: 2147686477675969222}
m_Layer: 5
m_Name: ContinueHide
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2206978438437783445
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7887297673964724319}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1736330635485585599}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 776}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2147686477675969222
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7887297673964724319}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
--- !u!1 &8269079580314517156
GameObject:
m_ObjectHideFlags: 0