Graphics Reference
In-Depth Information
{
Instantiate( powerUpPrefab,aPosition,Quaternion.identity );
powerupExplosionCounter=0;
}
}
public void Explode ( Vector3 aPosition )
{
// instantiate an explosion at the position passed into this
// function
Instantiate( explosionPrefab,aPosition, Quaternion.identity );
}
public void PlayerHit(Transform whichPlayer)
{
// tell our sound controller to play an explosion sound
BaseSoundController.Instance.PlaySoundByIndex( 2,
whichPlayer.position );
// call the explosion function!
Explode( whichPlayer.position );
}
// UI update calls
public void UpdateScoreP1( int aScore )
{
if( UIControl != null )
UIControl.UpdateScoreP1( aScore );
}
public void UpdateLivesP1( int aScore )
{
if( UIControl != null )
UIControl.UpdateLivesP1( aScore );
}
public void UpdateScoreP2( int aScore )
{
if( UIControl != null )
UIControl.UpdateScoreP2( aScore );
}
public void UpdateLivesP2( int aScore )
{
if( UIControl != null )
UIControl.UpdateLivesP2( aScore );
}
private void StopPlayers()
{
playerScript.GameFinished();
}
private bool player1Dead;
private bool player2Dead;
Search WWH ::




Custom Search