public override void OnEvent(CreateNetworkedBuilding evnt) { if (BoltNetwork.isServer) { return; } BoltEntitiesManager.LoadEntity(evnt); }
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; }