Post Jam updates (Fullscreen, Demo Mode, Calm the AI down)

This commit is contained in:
Texel 2021-05-03 05:20:03 -04:00
parent 95579bcc3e
commit 1c0607804f
17 changed files with 913 additions and 26 deletions

BIN
Assets/Art/AllButtons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -0,0 +1,223 @@
fileFormatVersion: 2
guid: 8fcdefe117c22b0418ec8c587a2b7601
TextureImporter:
internalIDToNameTable:
- first:
213: -2667601937048796137
second: AllButtons_0
- first:
213: 8214095464950831658
second: AllButtons_1
- first:
213: 3330059195138927908
second: AllButtons_2
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: AllButtons_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 217
height: 160
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: e8633c391ce90bd46800de6ee937ec42
internalID: -2667601937048796137
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: AllButtons_1
rect:
serializedVersion: 2
x: 217
y: 0
width: 217
height: 160
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: a161879b1b960b74897ae1a7f000a254
internalID: 8214095464950831658
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: AllButtons_2
rect:
serializedVersion: 2
x: 434
y: 0
width: 217
height: 160
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: dc9b0e32ae1bc9f478fdbf8b685f7982
internalID: 3330059195138927908
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Art/AllButtons2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -0,0 +1,223 @@
fileFormatVersion: 2
guid: 0bfd909715d8ed343a18a1e0d0eaef05
TextureImporter:
internalIDToNameTable:
- first:
213: -6376664015803450011
second: AllButtons2_0
- first:
213: -1642888619156654608
second: AllButtons2_1
- first:
213: 465436041436826799
second: AllButtons2_2
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: AllButtons2_0
rect:
serializedVersion: 2
x: 0
y: 0
width: 217
height: 160
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: f4c305391d85fc74898c9a1999e3296e
internalID: -6376664015803450011
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: AllButtons2_1
rect:
serializedVersion: 2
x: 217
y: 0
width: 217
height: 160
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: df0c401230271434c95a0dd4486be33d
internalID: -1642888619156654608
vertices: []
indices:
edges: []
weights: []
- serializedVersion: 2
name: AllButtons2_2
rect:
serializedVersion: 2
x: 434
y: 0
width: 217
height: 160
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: 0
bones: []
spriteID: f6500477f0c47b24f8f43382092d417a
internalID: 465436041436826799
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Art/Fullscreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,91 @@
fileFormatVersion: 2
guid: 0c3cfec06efe6874781e64fce6d7e3f7
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,91 @@
fileFormatVersion: 2
guid: 0403aa286f80a324abeeb112bcd60031
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class FullscreenToggler : MonoBehaviour {
public Sprite Fullscreen, Window;
// Start is called before the first frame update
void Start() {
GetComponent<Button>().onClick.AddListener(onButtonClick);
}
void onButtonClick() {
Screen.fullScreen = !Screen.fullScreen;
}
// Update is called once per frame
void Update() {
bool state = Screen.fullScreen;
var img = GetComponent<Image>().sprite = state ? Fullscreen : Window;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bd8ec73c712204645877689af899e16f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -142,7 +142,10 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
ApplyTrash(); ApplyTrash();
delayState = DelayState.None; delayState = DelayState.None;
UpdateNow();
} }
} }
return; return;
@ -172,8 +175,11 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
} else { } else {
timeInState = airCollapseTime; // instant timeInState = airCollapseTime; // instant
} }
lastState = DelayState.Collapse; lastState = DelayState.Collapse;
delayState = DelayState.Collapse; delayState = DelayState.Collapse;
UpdateNow();
return; return;
} }
} }
@ -194,6 +200,7 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
if (timeInState > AutoDeathTime) { if (timeInState > AutoDeathTime) {
if (dangerLevel > ROW) { if (dangerLevel > ROW) {
ApplyTrash(); ApplyTrash();
UpdateNow();
} 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
} }

View File

@ -43,8 +43,12 @@ public class GameBoardInstance : MonoBehaviour {
player1.Stop(); player1.Stop();
player2.Stop(); player2.Stop();
if (wasInDemo) {
ExitGame(true);
} else {
StartCoroutine(EndGameTimer(5f)); StartCoroutine(EndGameTimer(5f));
} }
}
} else if (state == GameState.Continue){ } else if (state == GameState.Continue){
var response = -1; var response = -1;
if (NetworkManager.inRoom){ if (NetworkManager.inRoom){
@ -92,7 +96,7 @@ public class GameBoardInstance : MonoBehaviour {
player2.Clear(); player2.Clear();
} }
public void SetupGame(){ public void SetupGame(bool asDemo = false){
System.Action callback; System.Action callback;
ClearGame(); ClearGame();
@ -111,6 +115,9 @@ public class GameBoardInstance : MonoBehaviour {
player2.authorityID = -1; player2.authorityID = -1;
callback = StartSinglePlayer; callback = StartSinglePlayer;
if (asDemo) callback = StartDemo;
// why isn't this legal???
//callback = asDemo ? StartDemo : StartSinglePlayer;
} }
player1.Setup(); player1.Setup();
@ -153,15 +160,32 @@ public class GameBoardInstance : MonoBehaviour {
Rematch.Instance.Setup(); Rematch.Instance.Setup();
} }
static bool wasInDemo = false;
private void StartSinglePlayer(){ private void StartSinglePlayer(){
player1.StartGame(); player1.StartGame();
player2.StartGame(); player2.StartGame();
player2.StartAI(new[] { 0.5f, 0.2f, 0.1f, 0f }[AIDifficulty]); //player2.StartAI(new[] { 0.5f, 0.2f, 0.1f, 0f }[AIDifficulty]);
player2.StartAI(new[] { 2f, 0.5f, 0.2f, 0f }[AIDifficulty]);
wasInDemo = false;
}
[ContextMenu("Start Demo")]
private void StartDemo() {
player1.StartGame();
player2.StartGame();
player1.StartAI(Random.value * 0.4f);
player2.StartAI(Random.value * 0.4f);
wasInDemo = true;
} }
private void StartMultiPlayer(){ private void StartMultiPlayer(){
player1.StartGame(); player1.StartGame();
player2.StartGame(); player2.StartGame();
wasInDemo = false;
} }
public void ExitGame(bool force = false){ public void ExitGame(bool force = false){

View File

@ -23,6 +23,7 @@ public class GameBoardRender : MonoBehaviour {
[Header("Extra")] [Header("Extra")]
public TileRender place1; public TileRender place1;
public TileRender place2; public TileRender place2;
public TileRender place1a, place2a; // Ghost tile display
public TileRender place3, place4; // Next tile display public TileRender place3, place4; // Next tile display
public SimpleAnimationLoop[] characterAnimations; public SimpleAnimationLoop[] characterAnimations;
@ -124,9 +125,15 @@ public class GameBoardRender : MonoBehaviour {
place1 = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>(); place1 = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>();
place2 = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>(); place2 = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>();
place1a = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>();
place2a = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>();
place3 = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>(); place3 = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>();
place4 = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>(); place4 = Instantiate(GameBoardInstance.instance.tilePrefab, corner).GetComponent<TileRender>();
place1a.transform.localPosition = Vector3.zero;
place2a.transform.localPosition = Vector3.zero;
place1.transform.localPosition = Vector3.zero; place1.transform.localPosition = Vector3.zero;
place2.transform.localPosition = Vector3.zero; place2.transform.localPosition = Vector3.zero;
place3.transform.localPosition = Vector3.zero; place3.transform.localPosition = Vector3.zero;
@ -220,6 +227,8 @@ public class GameBoardRender : MonoBehaviour {
public void ClearPlacement(){ public void ClearPlacement(){
place1.ClearDisplay(); place1.ClearDisplay();
place2.ClearDisplay(); place2.ClearDisplay();
place1a.ClearDisplay();
place2a.ClearDisplay();
place3.ClearDisplay(); place3.ClearDisplay();
place4.ClearDisplay(); place4.ClearDisplay();
} }
@ -237,6 +246,35 @@ public class GameBoardRender : MonoBehaviour {
place1.SetDisplay(left, left.color, left.kind); place1.SetDisplay(left, left.color, left.kind);
place2.SetDisplay(right, right.color, right.kind); place2.SetDisplay(right, right.color, right.kind);
int min = Mathf.Min(leftPosition.x, rightPosition.x), max = Mathf.Max(rightPosition.x, leftPosition.x);
if (min >= 0 && max < GameBoard.COLUMN) {
int leftHeight = board.board[leftPosition.x].Count;
int rightHeight = board.board[rightPosition.x].Count;
switch(board.playerRotation) {
case 3:
leftHeight += 1;
break;
case 1:
rightHeight += 1;
break;
}
place1a.transform.localPosition = new Vector3(leftPosition.x * width, leftHeight * height);
place2a.transform.localPosition = new Vector3(rightPosition.x * width, rightHeight * height);
place1a.SetDisplay(left.color, left.kind);
place2a.SetDisplay(right.color, right.kind);
var fade = new Color(1, 1, 1, board.delayState.Equals(GameBoard.DelayState.None) ? 0.5f : 0.0f);
place1a.renderer.color = fade;
place2a.renderer.color = fade;
} else {
place1a.ClearDisplay();
place2a.ClearDisplay();
}
} }
void RebuildStack(Transform root, TileList tiles){ void RebuildStack(Transform root, TileList tiles){

View File

@ -8782,8 +8782,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 98.7, y: -48.3} m_AnchoredPosition: {x: 58, y: -48.3}
m_SizeDelta: {x: 33.55, y: 32.36} m_SizeDelta: {x: 38.67, y: 32.36}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &565950779861049767 --- !u!222 &565950779861049767
CanvasRenderer: CanvasRenderer:
@ -8811,7 +8811,8 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 21300000, guid: 8f8cf9388c6bebf4da648cb603b32d49, type: 3} m_Sprite: {fileID: 8214095464950831658, guid: 8fcdefe117c22b0418ec8c587a2b7601,
type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@ -8876,8 +8877,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5f22fd919e31ff14f816d4ac2ac5b136, type: 3} m_Script: {fileID: 11500000, guid: 5f22fd919e31ff14f816d4ac2ac5b136, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Unmuted: {fileID: 21300000, guid: 8f8cf9388c6bebf4da648cb603b32d49, type: 3} Unmuted: {fileID: 8214095464950831658, guid: 8fcdefe117c22b0418ec8c587a2b7601, type: 3}
Muted: {fileID: 21300000, guid: 447378b52f1cc68408835ecc08470b9a, type: 3} Muted: {fileID: -1642888619156654608, guid: 0bfd909715d8ed343a18a1e0d0eaef05, type: 3}
MutesMusic: 0 MutesMusic: 0
--- !u!1 &1736330633559397463 --- !u!1 &1736330633559397463
GameObject: GameObject:
@ -14930,6 +14931,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 2042074775933466380} - {fileID: 2042074775933466380}
- {fileID: 4901449696098702457} - {fileID: 4901449696098702457}
- {fileID: 2999342363478846092}
m_Father: {fileID: 299606013} m_Father: {fileID: 299606013}
m_RootOrder: 3 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -14974,8 +14976,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 56.870075, y: -48.299988} m_AnchoredPosition: {x: 22.13003, y: -48.299988}
m_SizeDelta: {x: 33.55, y: 32.36} m_SizeDelta: {x: 38.67, y: 32.36}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9169607402770690341 --- !u!222 &9169607402770690341
CanvasRenderer: CanvasRenderer:
@ -15003,7 +15005,8 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 21300000, guid: e4683db7ee00da245b033812e6fdf9ac, type: 3} m_Sprite: {fileID: -2667601937048796137, guid: 8fcdefe117c22b0418ec8c587a2b7601,
type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@ -15068,8 +15071,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5f22fd919e31ff14f816d4ac2ac5b136, type: 3} m_Script: {fileID: 11500000, guid: 5f22fd919e31ff14f816d4ac2ac5b136, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
Unmuted: {fileID: 21300000, guid: e4683db7ee00da245b033812e6fdf9ac, type: 3} Unmuted: {fileID: -2667601937048796137, guid: 8fcdefe117c22b0418ec8c587a2b7601,
Muted: {fileID: 21300000, guid: 076a3878e0340bb41b97b9fe97771926, type: 3} type: 3}
Muted: {fileID: -6376664015803450011, guid: 0bfd909715d8ed343a18a1e0d0eaef05, type: 3}
MutesMusic: 1 MutesMusic: 1
--- !u!1 &5157846481027845323 --- !u!1 &5157846481027845323
GameObject: GameObject:
@ -15394,6 +15398,140 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
option: 2 option: 2
--- !u!1 &5642264247351026407
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2999342363478846092}
- component: {fileID: 2471831850338812620}
- component: {fileID: 6941949088981380326}
- component: {fileID: 6213111896319588144}
- component: {fileID: 4909875804616707824}
m_Layer: 5
m_Name: ToggleFullscreen
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2999342363478846092
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5642264247351026407}
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: 5243465428818291131}
m_RootOrder: 2
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: 95.94, y: -48.299988}
m_SizeDelta: {x: 38.67, y: 32.36}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2471831850338812620
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5642264247351026407}
m_CullTransparentMesh: 0
--- !u!114 &6941949088981380326
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5642264247351026407}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 3330059195138927908, guid: 8fcdefe117c22b0418ec8c587a2b7601,
type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &6213111896319588144
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5642264247351026407}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6941949088981380326}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &4909875804616707824
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5642264247351026407}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd8ec73c712204645877689af899e16f, type: 3}
m_Name:
m_EditorClassIdentifier:
Fullscreen: {fileID: 3330059195138927908, guid: 8fcdefe117c22b0418ec8c587a2b7601,
type: 3}
Window: {fileID: 465436041436826799, guid: 0bfd909715d8ed343a18a1e0d0eaef05, type: 3}
--- !u!1 &5873550528272711806 --- !u!1 &5873550528272711806
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -109,6 +109,8 @@ public class GameTransition : MonoBehaviour {
private bool prevState; private bool prevState;
private bool curState; private bool curState;
public float timeSinceInputOnRoot = 0f;
private void Update() { private void Update() {
// obscure fix to input field + esc // obscure fix to input field + esc
@ -148,7 +150,21 @@ public class GameTransition : MonoBehaviour {
} }
} }
if (state == GameState.Menu) {
timeSinceInputOnRoot += Time.deltaTime;
if (timeSinceInputOnRoot > 15) {
//state = GameState.SinglePlayer;
GameBoardInstance.instance.SetupGame(true);
Debug.Log("Starting Demo");
timeSinceInputOnRoot = 0;
}
} else {
timeSinceInputOnRoot = 0f;
}
if (Input.anyKey)
timeSinceInputOnRoot = 0f;
// transform // transform
var dist = Time.deltaTime * lerpSpeed; var dist = Time.deltaTime * lerpSpeed;

View File

@ -118,7 +118,7 @@ PlayerSettings:
16:10: 0 16:10: 0
16:9: 1 16:9: 1
Others: 0 Others: 0
bundleVersion: 0.1 bundleVersion: 0.11
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0