Fixed Blocks Not Placing For Clients

This commit is contained in:
2022-02-04 20:02:55 -06:00
parent 215d709915
commit b278e511ff
6 changed files with 174 additions and 35 deletions

View File

@@ -15,6 +15,18 @@ public class KingMove : MonoBehaviour
Grid = GameObject.FindGameObjectWithTag("KingGrid");
}
void Start()
{
// Turn on the king grid after a couple seconds. Allows scripts to grab their reference to it before it is disabled
StartCoroutine(TurnOffGridAtStartOfMatch());
}
IEnumerator TurnOffGridAtStartOfMatch()
{
yield return new WaitForSecondsRealtime(0.5f);
Grid.GetComponent<GridReveal>().GridSwitch(false);
}
// Update is called once per frame
void Update() {
float translation = Input.GetAxis("KingMove") * speed;