C# Class ProjectStorms.Minimap

Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: patferguson/Storms-Project

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
Awake ( ) : void
CreateMapIcons ( ) : void

Creates the maps icon using the given prefabs (assumes prefabs aren't null)

OnDisable ( ) : void
OnEnable ( ) : void
OnWillRenderCanvas ( ) : void

Callback function for when cavas is going to be rendered. Will update the minimap's icons when called

PopulateCacheLists ( ) : void

Retrieves the transforms for all players, bases, and repair zones within the map

PositionIconToTransform ( RectTransform a_iconTrans, Transform a_transform ) : void

Positions an icon to the given transform, in minimap-space

SetupCaptureCamera ( ) : void

Sets up the capture camera using the level's "Level Bounds" prefab

SetupScoreIndicators ( ) : void

Gets references to the score bar scripts through this game object's children (changing the hierachy in any way for the minimap will break this code) and presets their score percentages to zero

Start ( ) : void
UpdateBaseIcons ( ) : void
UpdatePlayerIcons ( ) : void

Updates all player icon's canvas position and rotation, as well as smoothly interpolates their scale as players carry more or less passengers

UpdatePrisonShipIcon ( ) : void

Updates the prison ship icon, and will flash colour tint when passengers dropping, are detected

UpdateScoreIndicators ( ) : void

Updates animation speed of score indicators for changes within the editor to be reflected, or other gameplay elements affecting it. Also smoothly interpolates score percentages as player score increases

Method Details

Awake() public méthode

public Awake ( ) : void
Résultat void

CreateMapIcons() public méthode

Creates the maps icon using the given prefabs (assumes prefabs aren't null)
public CreateMapIcons ( ) : void
Résultat void

OnDisable() public méthode

public OnDisable ( ) : void
Résultat void

OnEnable() public méthode

public OnEnable ( ) : void
Résultat void

OnWillRenderCanvas() public méthode

Callback function for when cavas is going to be rendered. Will update the minimap's icons when called
public OnWillRenderCanvas ( ) : void
Résultat void

PopulateCacheLists() public méthode

Retrieves the transforms for all players, bases, and repair zones within the map
public PopulateCacheLists ( ) : void
Résultat void

PositionIconToTransform() public méthode

Positions an icon to the given transform, in minimap-space
public PositionIconToTransform ( RectTransform a_iconTrans, Transform a_transform ) : void
a_iconTrans UnityEngine.RectTransform Rectangle transform of the icon
a_transform UnityEngine.Transform Transform to move this icon to
Résultat void

SetupCaptureCamera() public méthode

Sets up the capture camera using the level's "Level Bounds" prefab
public SetupCaptureCamera ( ) : void
Résultat void

SetupScoreIndicators() public méthode

Gets references to the score bar scripts through this game object's children (changing the hierachy in any way for the minimap will break this code) and presets their score percentages to zero
public SetupScoreIndicators ( ) : void
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

UpdateBaseIcons() public méthode

public UpdateBaseIcons ( ) : void
Résultat void

UpdatePlayerIcons() public méthode

Updates all player icon's canvas position and rotation, as well as smoothly interpolates their scale as players carry more or less passengers
public UpdatePlayerIcons ( ) : void
Résultat void

UpdatePrisonShipIcon() public méthode

Updates the prison ship icon, and will flash colour tint when passengers dropping, are detected
public UpdatePrisonShipIcon ( ) : void
Résultat void

UpdateScoreIndicators() public méthode

Updates animation speed of score indicators for changes within the editor to be reflected, or other gameplay elements affecting it. Also smoothly interpolates score percentages as player score increases
public UpdateScoreIndicators ( ) : void
Résultat void