Ignition / PlayersGroup

Namespace Playniax.Ignition

Inherits from MonoBehaviour

Class or component can be found in Assets/Playniax/Framework/Ignition/Framework/Scripts (MonoBehaviour)/PlayersGroup.cs

Class PlayersGroup

Description

Whether the GameObject is 'marked' as a player or not.

PlayerControls and some of the AI and bullet spawners depend on it.

Public fieldsDescription
string id = "Player 1"Player id.

Public MethodsDescription
static int Count()Returns the total of active players from the group.
static GameObject Get(string id)Returns the player by id.
static GameObject GetFirstAvailable(GameObject locked = null)Returns the first player from the group.
static List GetList()Returns a list of all players in the group.
static GameObject GetRandom(GameObject locked = null)Returns a random player from the group.
static bool IsMember(GameObject gameObject)Returns whether player is a member of the group or not.