-
Notifications
You must be signed in to change notification settings - Fork 6
2 ‐ Importing demo assets
Kaden edited this page Dec 6, 2024
·
12 revisions
BIMOS contains sample assets and the sample scene from the demo that may be useful for level creation and programming:
- Axe
- BallCrate
- BlockTower
- Door
- Elevator
- GrappleGun
- Hammer
- Hook
- Key
- Ladder
- LargeSled
- PedestalButton
- Pistol
- Ragdoll
- Table
- Target
- Thruster
- ThrusterReversed
- Tower
- Select the latest
Release
underReleases
on the GitHub repository.
- Select and download
DemoAssets.unitypackage
- Drag
Demo.unitypackage
into theProject
window
The assets used in the demo will now be available in Assets/Samples/BIMOS/1.x.x/Demo Assets
The assets used in the demo will now be available in Assets/Samples/BIMOS/1.x.x/Demo Assets
The Sample
Scene
's triggers only work if User Layer 6
is BIMOSRig
:
The Sample
Scene
's lighting uses Adaptive Probe Volumes
. Make sure you have them enabled in the URP Asset
settings:
- Script to trigger events is DistanceTrigger in
PedestalButton/Button
. -
Event
s underOnActivate ()
will be fired whenButton
is first pressed. -
Event
s underOnDeactivate ()
will be fired whenButton
is first released.
The sample assets contain scripts that could be helpful for level design.
You can find these scripts under Add Component
→ BIMOS
:
- Can be added to a
GameObject
with aCollider
to detect when otherCollider
s of certain layers enter and exit it.-
Event
s added toEnterEvent ()
will trigger when other colliders enter a collision with the collider. -
Event
s added toExitEvent ()
will trigger when other colliders exit a collision with the collider.
-
- The
Destroy On Touch
Boolean will destroy theGameObject
with the script when anotherCollider
enters a collision with it. - The
Event
s will only be called if the otherCollider
uses a layer found in theLayer Mask
.
- Used to detect when a transforms enters/exits a particular distance from another transform.
- Be careful with using many of these as the distance check happens every
FixedUpdate
. - Used in the
Pistol
asset to determine where the slide is in relation to the rest of the gun.
- Public procedures to change scene
- Can be referenced by events
-
Quit()
quits the application -
LoadScene(sceneIndex)
loads the scene at build indexsceneIndex
-
LoadMainMenu()
loads the scene with the nameMainMenu
- Can be implemented into classes to make them able to be damaged by damaging items (currently only the pistol).
- Call
TakeDamage(damageAmount)
on a class that implements this interface to damage it. - For an example, see
Target.cs
in the sample assets.
- Can be added to a
GameObject
with aCollider
to store a health value which can be decreased through damage.- The only damaging item so far is the
Pistol
.
- The only damaging item so far is the
- The
Starting Health
is the health that the object will have when the game starts. -
Events
added toDeathEvent ()
will trigger whenHealth
is less than or equal to 0.
- Plays a random
AudioClip
fromCollision Clips
if a collision occurs with anImpulse
greater thanThreshold Impulse
. - The
Volume
of theAudioSource
is constant as long as theThreshold Impulse
is met. - Used by the
Cartridge
s that are ejected from thePistol
asset.
- Respawns a Prefab in the scene when
Respawn()
is called. -
Respawn On Awake
spawns the object when the scene loads. -
Prefab
is the prefab to be respawned.- Used in the demo to respawn the
LargeSled
s in theSlides
scene.
- Used in the demo to respawn the
KadenZombie8 2024