Graphics Reference
In-Depth Information
public void LateUpdate ()
{
if(!isStopped)
{
// do fly movement through the level
CameraTransform.Translate( Vector3.up *
Time.deltaTime * levelForwardSpeed );
}
}
public void StartPlayer ()
{
Debug.Log ("StartPlayer!!!");
// find the player's control script and hold it in
// playerScript
playerScript1= playerGO1.GetComponent<Player_SpaceShip_IP>();
mainPlayerDataManager1=
playerGO1.GetComponent<BasePlayerManager>().DataManager;
// all ready to play, let's go!
playerGO1.SendMessage( "GameStart" );
// now, if there *is* a player 2, let's tell it to get going
if(totalPlayers>1)
{
// find the player's control script and hold it in
// playerScript
playerScript2=
playerGO2.GetComponent<Player_SpaceShip_IP>();
mainPlayerDataManager2=
playerGO2.GetComponent<BasePlayerManager>().DataManager;
playerGO2.SendMessage( "GameStart" );
}
}
public void StopMovingForward ()
{
isStopped=true;
}
public void ContinueForward()
{
isStopped=false;
}
public void BossDestroyed()
{
ContinueForward();
if( BossWinToNextLevel )
{
// go to next level
Invoke("FinishedLevel", 3f);
}
}
Search WWH ::




Custom Search