Beispiel #1
0
        public override void OnRegister()
        {
            if (!photonView.isMine)
            {
                return;
            }
            view = GetComponent <SnakeNetworkPlayer>();

            targetTowardsX = 0;
            targetTowardsY = view.step;
            view.map       = GameObject.Find("onlineMap").GetComponent <OnlineMap>();
            sceneManager   = GameObject.Find("Manager").GetComponent <OnlineSceneManager>();
            StartCoroutine(Init());
            StartCoroutine(SpeedUp());

            sceneManager.gameOverSignal.AddListener(DieSignal);
        }
Beispiel #2
0
 public void StartGame()
 {
     sceneManager = GameObject.Find("Manager").GetComponent <OnlineSceneManager>();
     sceneManager.photonView.RPC("StartGame", PhotonTargets.All);
 }