Beispiel #1
0
    // Callback triggered before the new local scene has been completely loaded
    public override void SceneLoadLocalDone(string map)
    {
        ///   if(BoltNetwork.isClient && map.Equals("GameScene") {
        ///     SplashScreen.Hide();
        ///   }

        print("S SceneLoadLocalDone");
        PlayerObject p = PlayerObjectRegistry.CreateServerPlayer(new CameraSpawnPoint(new Vector3(0f, 0f, -20f)));
        //server done loading

        //Find camera
        Camera myCamera = PlayerCamera.instance.GetComponentInChildren <Camera>();

        //create potato
        potato = BoltNetwork.Instantiate(BoltPrefabs.Potato);

        //Map camera to potato script
        (potato.GetComponent <PotatoController>()).mainCamera = myCamera;

        //p.rightWall =
    }
 void Awake()
 {
     PlayerObjectRegistry.CreateServerPlayer();
 }