XIII
Class CWndFalling

source: C:\XIII\XIII\Classes\CWndFalling.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Effects
         |
         +--XIII.CWndBase
            |
            +--XIII.CWndFalling
Direct Known Subclasses:None

class CWndFalling
extends XIII.CWndBase

//----------------------------------------------------------- // XBOX FILE // Specific FX to be displayed when a falling occured //-----------------------------------------------------------
Variables
 vector CamPos
           should be the falling actor
 Actor Falling
           should be the falling actor
 float fov
           should be the falling actor
 int iPhase
 Texture onotext
           should be the falling actor


Function Summary
 
simulated
Tick(float DeltaT)
     
//SOUTHEND Moving frame code
//_____________________________________________________________________________



Source Code


00001	//-----------------------------------------------------------
00002	// XBOX FILE
00003	// Specific FX to be displayed when a falling occured
00004	//-----------------------------------------------------------
00005	class CWndFalling extends CWndBase;
00006	
00007	var int iPhase;
00008	var Actor Falling;  // should be the falling actor
00009	var vector CamPos;
00010	var texture onotext;
00011	var float fov;
00012	
00013	CONST WNDSIZE=256;
00014	CONST SFXDURATION=3.0;
00015	CONST SPACEX=17;
00016	
00017	//SOUTHEND Moving frame code
00018	//_____________________________________________________________________________
00019	simulated function Tick(float DeltaT)
00020	{
00021	    local float temp;
00022	
00023	    if (XIIIPlayerController(MyHudForFX.PlayerOwner.Pawn.Controller).multiViewport != none
00024	     || XIIIPlayerController(MyHudForFX.PlayerOwner.Pawn.Controller).fCamViewPercent>0.0)
00025	    {
00026	      MyHUDForFX.EraseLowPriorityCartoonWindows();
00027	//      Destroy(); // should not be needed as I'm Low priority
00028	      return;
00029	    }
00030	    temp = VSize(falling.location-campos)*2.54/200;
00031	    if (temp > 10.0)
00032	      temp = 10.0;
00033	    if (temp < 1.0)
00034	      temp = 1.0;
00035	    fov = 90 - 7*temp;
00036	
00037	    HideUnwanted();
00038	    switch (iPhase)
00039	    {
00040	      Case 1:
00041	        MyHudForFX.CWndMat.Update( 0, 0, WNDSIZE, WNDSIZE, campos, rotator(falling.location - campos), fov, FilterColor,HighLight,FilterTexture );
00042	      break;
00043	    }
00044	    RestoreUnwanted();
00045	}
00046	
00047	
00048	//_____________________________________________________________________________
00049	event Timer()
00050	{
00051	    local float temp;
00052	
00053	    DebugLog(self@"Timer, iPhase="$iPhase@"MyHudForFX="$MyHudForFX);
00054	
00055	    if ( (iPhase == 0) && (MyHudForFX.HudWnd != none) )
00056	    {
00057	      MyHudForFX.EraseLowPriorityCartoonWindows();
00058	      if ( MyHudForFX.HudWnd != none )
00059	      {
00060	        Destroy();
00061	        return;
00062	      }
00063	    }
00064	    iPhase ++;
00065	    HideUnwanted();
00066	    switch (iPhase)
00067	    {
00068	      Case 1:
00069	        DebugLog(self@"Timer, iPhase="$iPhase@"MyHudForFX="$MyHudForFX);
00070	        temp = VSize(falling.location-campos)*2.54/200;
00071	        if (temp > 10.0)
00072	          temp = 10.0;
00073	        if (temp < 1.0)
00074	          temp = 1.0;
00075	        fov = 90 - 7*temp;
00076	
00077	        MyHudForFX.CWndMat.Update( 0, 0, WNDSIZE, WNDSIZE, campos, rotator(falling.location - campos), fov, FilterColor,HighLight,FilterTexture );
00078	//        Log("Add Falling CWnd");
00079	        AddWnd(0, 0, (WNDSIZE-10)*3/4, (WNDSIZE-10), MyHudForFX.CWndMat, 0, WNDSIZE*1/8, WNDSIZE*3/4, WNDSIZE*7/8, SFXDURATION, true);
00080	        SetTimer(3.5, true);
00081	
00082	        CWndBorderColor = class'canvas'.static.MakeColor(0,0,0,0);
00083	//        Log("Add Falling OnoTex");
00084	        AddWnd(80, 100, 150, 100, onotext, 0, 0, onotext.USize, onotext.VSize, SFXDURATION, true);
00085	        CWndBorderColor = default.CWndBorderColor;
00086	
00087	        break;
00088	      Case 2:
00089	        Destroy();
00090	        break;
00091	    }
00092	    RestoreUnwanted();
00093	}
00094	
00095	
00096	defaultproperties
00097	{
00098	     onotext=Texture'XIIICine.effets.death2'
00099	     CWndAppearFX=2
00100	     CWndSoundType=0
00101	}

End Source Code