//=============================================================================
// WildcardsMeshFX.
// Because I want some of the buildings look cool other then a bland blur
// of fuzzy lens flares.... yawn.....
//=============================================================================
class WildcardsMeshFX expands sgMeshFX;

var WildcardsMeshFX NextFX;

function PostBeginPlay()
{
 ColorSelect();
}

simulated function PostNetBeginPlay()
{
 ColorSelect();
}


simulated function ColorSelect()
{
 switch(sgBuilding(Owner).Team)
 {
  Case 0:
  Texture = sgBuilding(Owner).SkinRedTeam;
  break;
  
  Case 1:
  Texture = sgBuilding(Owner).SkinBlueTeam;
  break;
  
  Case 2:
  Texture = sgBuilding(Owner).SkinGreenTeam;
  break;
  
  Case 3:
  Texture = sgBuilding(Owner).SkinYellowTeam;
  break;
 }
}


simulated function Tick(float deltaTime)
{
 if ( sgBuilding(Owner) == None )
 {
  Destroy();
  return;
 }
}

simulated function Destroyed()
{
    Super.Destroyed();
    if ( NextFX != None )
    {
        NextFX.Destroy();
        NextFX = None;
    }
}

simulated function SetSize(float size)
{
    DrawScale = size;
    if ( NextFX != None )
    {
        NextFX.SetSize(size);
    }
}

defaultproperties
{
}
