## XIDMaps
Class CreditsManager

source: C:\XIII\XIDMaps\Classes\CreditsManager.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Info
             |
             +--XIDMaps.CreditsManager

Direct Known Subclasses:None

class CreditsManager
extends Engine.Info

Variables
`Array` | `CreditsParadeTags`
`XIIIPlayerController` | `PC`
`float` | `YStart`
`M16Pick` | `pi;*/`

States
STA_Credits

State STA_Credits Function Summary
`void` | `StopParade( )`
    {
    	LOCAL CreditsParade cp;
    	LOCAL bool bSkip;

    	do
    	{
    		switch (caps(left(string(CreditsParadeTags[ParadeIndex]),2)))
    		{
    		case "PC":
    			bSkip = ( XIIIGameInfo(Level.Game).Plateforme!=PF_PC );
    			break;
    		case "PS":
    			bSkip = ( XIIIGameInfo(Level.Game).Plateforme!=PF_PS2 );
    			break;
    		case "GC":
    			bSkip = ( XIIIGameInfo(Level.Game).Plateforme!=PF_GC );
    			break;
    		case "XB":
    			bSkip = ( XIIIGameInfo(Level.Game).Plateforme!=PF_XBOX );
    			break;
    		default:
    			bSkip = false;
    		}

    		if ( bSkip )
    			ParadeIndex++;

    	} until ( !bSkip || ParadeIndex >= CreditsParadeTags.Length )

    	if ( ParadeIndex < CreditsParadeTags.Length )
    	{
    		foreach DynamicActors(class'CreditsParade',CP,CreditsParadeTags[ParadeIndex])
    		{
    			RunningCreditsParades.Insert( 0, 1 );
    			RunningCreditsParades[0]=CP;
    			LOG ( "START CREDIT "@CP.Tag@"("$CP$")"$ParadeIndex );
    			CP.Start();
    			ParadeIndex++;
    			return;
    		}
    	}
    }
`void` | `ShowNextParade()`
    {
    	LOCAL int i;

    	for( i=0;i
`void` | `DisplayDebug(Canvas Canvas, out float, out float)`
    	{
    		LOCAL CreditsParade cp;

    		XIIIGameInfo(Level.Game).MapInfo.EndCartoonEffect=true;
    		if ( PC.ViewTarget==self)
    		{
    			foreach DynamicActors(class'CreditsParade',CP)
    			{
    				CP.Init(Canvas, HUD);
    				CP.CM = self;
    			}
    			ShowNextParade();
    			TriggerEvent( Event, self, none );
    			GotoState('');
    		}
    	}
    }
`void` | `DisplayDebug(Canvas Canvas, out float, out float)`
    {
    	EVENT BeginState()
    	{
    		Level.InitialCartoonEffect = 0;
    		SetTimer( 0.1, false );
    	}

    	EVENT Timer( )
    	{
    		PC = XIIIPlayerController(PlayerController(Level.ControllerList));
    		HUD = XIIIBaseHud(PC.myHud);
    		PC.SetViewTarget( self );
    		PC.GotoState('NoControl');
    		HUD.bShowDebugInfo = true;
    		HUD.ShowDebugActor = none;
    	}

Source Code

    00001	class CreditsManager extends Info
    00002		hidecategories(Advanced,Collision,Display,LightColor,Lighting,MOvement,Object,RollOff,Sound)
    00003		placeable;
    00004
    00005	VAR()			Array<name>		CreditsParadeTags;
    00006	VAR				int				ParadeIndex;
    00007	VAR				Array<CreditsParade> RunningCreditsParades;
    00008	VAR				XIIIBaseHUD HUD;
    00009	//VAR				bool bEnded;
    00010			//**VAR				Array<float>	LineHeights, LineWidths;
    00011	//VAR				Array<int>		LineCodes;
    00012	VAR TRANSIENT	XIIIPlayerController PC;
    00013	/*VAR TRANSIENT	Canvas			Canvas;
    00014	VAR TRANSIENT	float			YStart;
    00015	VAR TRANSIENT	M16Pick			pi;*/
    00016	//VAR TRANSIENT	float			LargeFontHeight, BigFontHeight, MedFontHeight, SmallFontHeight;
    00017	//VAR TRANSIENT	float			MyYL, Highest;
    00018
    00019	// 0 -  Default text ( BigFont - Blanc )
    00020	// 1 - Titre ( LargeFont - Jaune )
    00021
    00022	AUTO STATE STA_Credits
    00023	{
    00024		EVENT BeginState()
    00025		{
    00026			Level.InitialCartoonEffect = 0;
    00027			SetTimer( 0.1, false );
    00028		}
    00029
    00030		EVENT Timer( )
    00031		{
    00032			PC = XIIIPlayerController(PlayerController(Level.ControllerList));
    00033			HUD = XIIIBaseHud(PC.myHud);
    00034			PC.SetViewTarget( self );
    00035			PC.GotoState('NoControl');
    00036			HUD.bShowDebugInfo = true;
    00037			HUD.ShowDebugActor = none;
    00038		}
    00039
    00040		FUNCTION DisplayDebug(Canvas Canvas, out float YL, out float YPos)
    00041		{
    00042			LOCAL CreditsParade cp;
    00043
    00044			XIIIGameInfo(Level.Game).MapInfo.EndCartoonEffect=true;
    00045			if ( PC.ViewTarget==self)
    00046			{
    00047				foreach DynamicActors(class'CreditsParade',CP)
    00048				{
    00049					CP.Init(Canvas, HUD);
    00050					CP.CM = self;
    00051				}
    00052				ShowNextParade();
    00053				TriggerEvent( Event, self, none );
    00054				GotoState('');
    00055			}
    00056		}
    00057	}
    00058
    00059	FUNCTION DisplayDebug(Canvas Canvas, out float YL, out float YPos)
    00060	{
    00061		LOCAL int i;
    00062
    00063		for( i=0;i<RunningCreditsParades.Length;i++)
    00064			RunningCreditsParades[i].DisplayCredits(Canvas);
    00065	}
    00066
    00067	FUNCTION ShowNextParade()
    00068	{
    00069		LOCAL CreditsParade cp;
    00070		LOCAL bool bSkip;
    00071
    00072		do
    00073		{
    00074			switch (caps(left(string(CreditsParadeTags[ParadeIndex]),2)))
    00075			{
    00076			case "PC":
    00077				bSkip = ( XIIIGameInfo(Level.Game).Plateforme!=PF_PC );
    00078				break;
    00079			case "PS":
    00080				bSkip = ( XIIIGameInfo(Level.Game).Plateforme!=PF_PS2 );
    00081				break;
    00082			case "GC":
    00083				bSkip = ( XIIIGameInfo(Level.Game).Plateforme!=PF_GC );
    00084				break;
    00085			case "XB":
    00086				bSkip = ( XIIIGameInfo(Level.Game).Plateforme!=PF_XBOX );
    00087				break;
    00088			default:
    00089				bSkip = false;
    00090			}
    00091
    00092			if ( bSkip )
    00093				ParadeIndex++;
    00094
    00095		} until ( !bSkip || ParadeIndex >= CreditsParadeTags.Length )
    00096
    00097
    00098		if ( ParadeIndex < CreditsParadeTags.Length )
    00099		{
    00100			foreach DynamicActors(class'CreditsParade',CP,CreditsParadeTags[ParadeIndex])
    00101			{
    00102				RunningCreditsParades.Insert( 0, 1 );
    00103				RunningCreditsParades[0]=CP;
    00104				LOG ( "START CREDIT "@CP.Tag@"("$CP$")"$ParadeIndex );
    00105				CP.Start();
    00106				ParadeIndex++;
    00107				return;
    00108			}
    00109		}
    00110	}
    00111
    00112	FUNCTION StopParade( )
    00113	{
    00114	//	if ( !bEnded )
    00115	//	{
    00116			RunningCreditsParades.Remove( RunningCreditsParades.Length-1, 1 );
    00117			if ( RunningCreditsParades.Length==0 )
    00118				Level.ServerTravel("mapmenu.unr", true);
    00119	//			TriggerEvent('Helico', self, none);
    00120	//	}
    00121	}
    00122	/*
    00123	EVENT Trigger(actor Other, pawn EventInstigator )
    00124	{
    00125		bEnded=true;
    00126		SetTimer( 0.06, false );
    00127	}
    00128
    00129	EVENT Timer()
    00130	{
    00131		Level.ServerTravel("mapmenu.unr", true);
    00132	}
    00133	*/
    00134
    00135
    00136	defaultproperties
    00137	{
    00138	     Texture=Texture'Engine.S_Pawn'
    00139	     bDirectional=True
    00140	}

End Source Code