C# Class Supermarket.Spawner

Prefab spawner. Spawns prefabs at a constant rate. Reassigns prefabs to an object pool when they are due for deletion.
Inheritance: UnityEngine.MonoBehaviour
显示文件 Open project: Clarksj4/Theme-Supermarket-Tycoon-World Class Usage Examples

Public Methods

Method Description
Awake ( ) : void
DeSpawn ( Customer obj ) : void

Returns the given object to the object pool and deactives it until it is spawned again.

OnDisable ( ) : void
OnEnable ( ) : void
Spawn ( Vector3 position, Quaternion rotation ) : MonoBehaviour

Spawns a new prefab at the given position

Spawn ( ) : void

Spawns the designated prefab at a random position or random interaction zone based on class fields.

Method Details

Awake() public method

public Awake ( ) : void
return void

DeSpawn() public method

Returns the given object to the object pool and deactives it until it is spawned again.
public DeSpawn ( Customer obj ) : void
obj Customer The object to despawn
return void

OnDisable() public method

public OnDisable ( ) : void
return void

OnEnable() public method

public OnEnable ( ) : void
return void

Spawn() public method

Spawns a new prefab at the given position
public Spawn ( Vector3 position, Quaternion rotation ) : MonoBehaviour
position UnityEngine.Vector3 The position at which to spawn the prefab
rotation UnityEngine.Quaternion
return UnityEngine.MonoBehaviour

Spawn() public method

Spawns the designated prefab at a random position or random interaction zone based on class fields.
public Spawn ( ) : void
return void