Graphics Reference
In-Depth Information
public void RemoveEnemyFromRadar( Transform aTransform )
{
theRadarControlScript.RemoveEnemyBlip( aTransform );
}
public Player_LBS GetMainPlayerScript ()
{
return focusPlayerScript;
}
public Transform GetMainPlayerTransform ()
{
return playerGO1.transform;
}
public GameObject GetMainPlayerGO ()
{
return playerGO1;
}
public void PlayerDied(int whichID)
{
// this is a single player game, so just end the game now
// both players are dead, so end the game
UIControl.ShowGameOver();
Invoke ("Exit",5);
}
void Exit()
{
Application.LoadLevel( mainMenuSceneName );
}
// UI update calls
//
public void UpdateScoreP1( int aScore )
{
UIControl.UpdateScoreP1( aScore );
}
public void UpdateLivesP1( int aScore )
{
UIControl.UpdateLivesP1( aScore );
}
}
11.5.1 Script Breakdown
GameController_LBS.cs derives from BaseGameController, which, in turn, derives
from MonoBehavior so that it can tap into some of Unity's built-in calls to functions like
Update(), Awake() and Start(), etc.:
using UnityEngine;
using System.Collections;
Search WWH ::




Custom Search