Exemple #1
0
        public override void OnWorldObjectPlaced(WorldObject placedObject)
        {
            BrokenComponent brokenComp = placedObject.GetComponent <BrokenComponent>();

            if (brokenComp != null)
            {
                brokenComp.InitiliazeValues(BrokenState, IsBroken);
            }
            base.OnWorldObjectPlaced(placedObject);
        }
Exemple #2
0
        public override void OnPickup(WorldObject placedObject)
        {
            BrokenComponent brokenComp = placedObject.GetComponent <BrokenComponent>();

            if (brokenComp != null)
            {
                BrokenState = brokenComp.BrokenState;
                IsBroken    = !brokenComp.Enabled;
            }
            base.OnPickup(placedObject);
        }