networked loss state
This commit is contained in:
parent
9ce29be2af
commit
2c7bceb8c3
2 changed files with 250 additions and 3 deletions
|
@ -157,9 +157,7 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
|
|||
return;
|
||||
case DelayState.None:
|
||||
if (HighestStack(board) >= 13) {
|
||||
delayState = DelayState.Loss;
|
||||
|
||||
StartCoroutine(HandleLoss(3f));
|
||||
RaiseEvent('l', true);
|
||||
// TODO - Do a bunch of networking silliness to end the game here
|
||||
}
|
||||
|
||||
|
@ -628,6 +626,12 @@ public class GameBoard : EntityBase, IAutoSerialize, IAutoDeserialize {
|
|||
|
||||
bool stateDirty = false;
|
||||
|
||||
[NetEvent('l')]
|
||||
void SendLossState(){
|
||||
delayState = DelayState.Loss;
|
||||
StartCoroutine(HandleLoss(3f));
|
||||
}
|
||||
|
||||
[Header("Network")]
|
||||
public float networkTick = 0.1f;
|
||||
private float nextNetworkTick;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue