C# Класс Supermarket.Spawner

Prefab spawner. Spawns prefabs at a constant rate. Reassigns prefabs to an object pool when they are due for deletion.
Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Awake() публичный Метод

public Awake ( ) : void
Результат void

DeSpawn() публичный Метод

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
Результат void

OnDisable() публичный Метод

public OnDisable ( ) : void
Результат void

OnEnable() публичный Метод

public OnEnable ( ) : void
Результат void

Spawn() публичный Метод

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
Результат UnityEngine.MonoBehaviour

Spawn() публичный Метод

Spawns the designated prefab at a random position or random interaction zone based on class fields.
public Spawn ( ) : void
Результат void