XIII
Class PlatformTrigger

source: C:\XIII\XIII\Classes\PlatformTrigger.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Triggers
         |
         +--XIII.PlatformTrigger
Direct Known Subclasses:None

class PlatformTrigger
extends Engine.Triggers

//----------------------------------------------------------- // Used to delete some actors if not on the specified platform //-----------------------------------------------------------
Variables
 Array PlatformList
 Array SpecificPlatforms


Function Summary
 void PostBeginPlay()
     
//_____________________________________________________________________________



Source Code


00001	//-----------------------------------------------------------
00002	// Used to delete some actors if not on the specified platform
00003	//-----------------------------------------------------------
00004	class PlatformTrigger extends Triggers;
00005	
00006	var() Array<Actor> PlatformList;
00007	enum PlatForm
00008	{
00009	  PF_PC,
00010	  PF_PS2,
00011	  PF_XBOX,
00012	  PF_GC,
00013	};
00014	//var() PlatForm SpecificPlatform;
00015	var() Array<PlatForm> SpecificPlatforms;
00016	
00017	//_____________________________________________________________________________
00018	function PostBeginPlay()
00019	{
00020		local int i;
00021		local bool bCurrentPlatForm;
00022	
00023	/*
00024	  if ((Level.Game != none) && (XIIIGameInfo(Level.Game).PlateForme != SpecificPlatform))
00025	  {
00026	  	for (i=0;i<PlatformList.Length;i++)
00027	  	{
00028	  		if (PlatformList[i]!=none)
00029	  			PlatformList[i].Destroy();
00030	  	}
00031	  }
00032	*/
00033	
00034		if ( Level.Game != none )
00035		{
00036			for (i=0;i<SpecificPlatforms.Length;i++)
00037			{
00038				if ( XIIIGameInfo(Level.Game).PlateForme == SpecificPlatforms[i] )
00039				{
00040					bCurrentPlatForm = true;
00041					break;
00042				}
00043			}
00044			if ( !bCurrentPlatForm )
00045			{
00046				for (i=0;i<PlatformList.Length;i++)
00047	  			{
00048	  				if (PlatformList[i]!=none)
00049	  					PlatformList[i].Destroy();
00050	  			}
00051			}
00052		}
00053		Destroy();
00054	}
00055	
00056	
00057	
00058	defaultproperties
00059	{
00060	}

End Source Code