Ejemplo n.º 1
0
        public static void UpdateEntity(UpdateNetworkedBuilding evnt)
        {
            int id       = evnt.buildingUID;
            var building = GetEntity(id);

            if (building != null)
            {
                building.AssingNetworkedHealth(evnt.health);

                if (BoltNetwork.isServer)
                {
                    evnt             = UpdateNetworkedBuilding.Create(Bolt.GlobalTargets.Others, Bolt.ReliabilityModes.ReliableOrdered);
                    evnt.buildingUID = id;
                    evnt.Send();
                }
            }
        }