Ejemplo n.º 1
0
        protected virtual void OnHealthChanged()
        {
            var evnt = new UpdateNetworkedBuilding();

            evnt.buildingUID = networkedID;
            evnt.health      = health;
            evnt.SendToServer();
        }
Ejemplo n.º 2
0
        public override void DestroyBuilding(BaseBuilding _building, RaycastHit hit)
        {
            UNetBuilding building = (UNetBuilding)_building;

            if (building == null)
            {
                base.DestroyBuilding(building, hit);
                return;
            }

            var evnt = new UpdateNetworkedBuilding();

            evnt.buildingUID = building.networkedID;
            evnt.health      = 0;
            evnt.SendToServer();
        }