C# Class ProjectStorms.Minimap

Inheritance: UnityEngine.MonoBehaviour
Mostrar archivo Open project: patferguson/Storms-Project

Private Properties

Property Type Description

Public Methods

Method 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 method

public Awake ( ) : void
return void

CreateMapIcons() public method

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

OnDisable() public method

public OnDisable ( ) : void
return void

OnEnable() public method

public OnEnable ( ) : void
return void

OnWillRenderCanvas() public method

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

PopulateCacheLists() public method

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

PositionIconToTransform() public method

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
return void

SetupCaptureCamera() public method

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

SetupScoreIndicators() public method

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
return void

Start() public method

public Start ( ) : void
return void

UpdateBaseIcons() public method

public UpdateBaseIcons ( ) : void
return void

UpdatePlayerIcons() public method

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
return void

UpdatePrisonShipIcon() public method

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

UpdateScoreIndicators() public method

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
return void