public void Set(PushRegion push) { bool aligned = push.shape == PushRegion.PushShape.alignedBox; bool box = aligned || push.shape == PushRegion.PushShape.orientedBox; AddTrigger(box, push.sphereRadius, push.extents); this.transform.position = push.transform.posRot.position; if (!aligned) { this.transform.rotation = push.transform.posRot.rotation; } else { this.transform.localRotation = Quaternion.identity; } forwardDir = push.transform.posRot.rotation * Vector3.forward; power = push.strength; noPlayer = push.noPlayer; massIndependant = push.massIndependent | push.grounded; radial = push.radial; grounded = push.grounded; turbulence = push.turbulence; if (push.jumpPad) { this.type = ForceType.SetVel; } else { this.type = ForceType.AddVel; } }
public LevelData() { brushes = new Brush[0]; lights = new UFLevelStructure.Light[0]; ambSounds = new AmbSound[0]; events = new UFLevelStructure.Event[0]; spawnPoints = new SpawnPoint[0]; particleEmitters = new UFLevelStructure.ParticleEmitter[0]; pushRegions = new PushRegion[0]; decals = new Decal[0]; climbingRegions = new ClimbingRegion[0]; boltEmitters = new BoltEmitter[0]; targets = new UFTransform[0]; entities = new Entity[0]; items = new Item[0]; clutter = new Clutter[0]; triggers = new Trigger[0]; movingGeometry = new Brush[0]; movingGroups = new MovingGroup[0]; geoRegions = new GeoRegion[0]; }