Exemplo n.º 1
0
 private void handleOtherToon(ShowOtherToon showOtherToon)
 {
     if (showOtherToon.Toon == null) {
         Logger.LogError("Show Other Toon was Null"); return;
     }
     var newplayer = (GameObject)Instantiate(Resources.Load("otherPlayer"));
     var newpl = newplayer.GetComponent<MobileController>();
     newpl.EnterWorld(showOtherToon.Toon);
     OtherPlayers.Add(newpl);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Called when a player logs on and his toon joins a scene.
        /// </summary>
        /// <param name="player"></param>
        internal void ToonJoinWorld(Account player)
        {
            Logger.Log(player.CurrentToon.Name + " Joined Scene : " + Serial + " Sending reveal to " + Toons.Count + " clients");
            ShowOtherToon show = new ShowOtherToon(player.CurrentToon);
            foreach (var t in Toons) {
                show.Send(t); // Reveal new player to old players.
                new ShowOtherToon(t.CurrentToon).Send(player);//.Send(player.Client.GetStream());// Reveal current players to new player

            }
            Toons.Add(player);
        }