Esempio n. 1
0
        public void Save()
        {
            PeerController controller = PeerController.Get(_id);

            if (controller.Colonist != null)
            {
                Position = controller.Colonist.transform.position;
            }
        }
Esempio n. 2
0
        private static void CreateColonist(Peer peer, Profile profile)
        {
            PeerController controller = PeerController.Get(peer.ProfileID);

            GameObject prefab       = ObjectReferenceManifest.GetObject <GameObject>("Colonist");
            GameObject instantiated = Network.Instantiate(prefab, profile.Position, Quaternion.identity);

            instantiated.name = $"Server {peer}";
            instantiated.transform.position = profile.Position;

            controller.AssignColonist(instantiated.GetComponent <Colonist>());
        }