Beispiel #1
0
        public override void OnEvent(CreateNetworkedBuilding evnt)
        {
            if (BoltNetwork.isServer)
            {
                return;
            }

            BoltEntitiesManager.LoadEntity(evnt);
        }
Beispiel #2
0
        public void LoadData(CreateNetworkedBuilding data)
        {
            this.transform.position = data.pos;
            this.transform.rotation = data.rot;

            CallLoad(this);

            this.networkedID = data.id;
            this.placedOn    = BoltEntitiesManager.GetEntity(data.placedOnID);

            if (placedOn != null)
            {
                this.SnappedTo = placedOn.ReturnSocket(transform.position, this.buildingType);
            }

            this.PlaceBuilding();

            BoltBuildingPlacer.LocalNetworkedBuildingPlaced(data.requester);

            this.health = data.health;
        }