XIII
Class CWndExplosion

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

class CWndExplosion
extends XIII.CWndBase

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


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



Source Code


00001	//-----------------------------------------------------------
00002	// XBOX FILE
00003	// Specific FX to be displayed when a Explosion occured
00004	//-----------------------------------------------------------
00005	class CWndExplosion extends CWndBase;
00006	
00007	var int iPhase;
00008	//var XIIIPawn Killed;  // should be the dying guy
00009	var Actor Explosion;  // should be the explosion
00010	var vector CamPos;
00011	//var texture CornerTexture;
00012	var texture onotext;
00013	var float fov;
00014	
00015	CONST WNDSIZE=256;
00016	CONST SFXDURATION=3.0;
00017	CONST SPACEX=17;
00018	
00019	//SOUTHEND Moving frame code
00020	//_____________________________________________________________________________
00021	simulated function Tick(float DeltaT)
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();
00028	      return;
00029	    }
00030	    HideUnwanted();
00031	    MyHudForFX.PlayerOwner.Pawn.bOwnerNoSee = true; // for these force not seeing the player
00032	    switch (iPhase)
00033	    {
00034	      Case 1:
00035	        MyHudForFX.CWndMat.Update( 0, 0, WNDSIZE, WNDSIZE, campos, rotator(explosion.location + vect(0,0,10) - campos), fov, FilterColor,HighLight,FilterTexture );
00036	      break;
00037	    }
00038	    RestoreUnwanted();
00039	}
00040	
00041	
00042	//_____________________________________________________________________________
00043	event Timer()
00044	{
00045	    local float temp;
00046	    if (iPhase==0 && MyHudForFX.HudWnd!=none)
00047	    {
00048	      Destroy();
00049	      return;
00050	    }
00051	    iPhase ++;
00052	    HideUnwanted();
00053	    switch (iPhase)
00054	    {
00055	      Case 1:
00056	        temp = VSize(explosion.location-campos)*2.54/200;
00057	        if (temp > 10.0)
00058	          temp = 10.0;
00059	        if (temp < 1.0)
00060	          temp = 1.0;
00061	        fov = 120 - 7*temp;
00062	
00063	        MyHudForFX.CWndMat.Update( 0, 0, WNDSIZE, WNDSIZE, campos, rotator(explosion.location + vect(0,0,10) - campos), fov, FilterColor,HighLight,FilterTexture );
00064	        AddWnd(0, 0, WNDSIZE-10, (WNDSIZE-10)*3/4, MyHudForFX.CWndMat, 0, WNDSIZE*1/8, WNDSIZE, WNDSIZE*3/4, SFXDURATION, true);
00065	        SetTimer(3.5, true);
00066	
00067	        CWndBorderColor = class'canvas'.static.MakeColor(0,0,0,0);
00068	        AddWnd(100, 100, 200, 200, onotext, 0, 0, onotext.USize, onotext.VSize, SFXDURATION, true);
00069	        CWndBorderColor = default.CWndBorderColor;
00070	
00071	        break;
00072	      Case 2:
00073	        Destroy();
00074	        break;
00075	    }
00076	    RestoreUnwanted();
00077	}
00078	
00079	
00080	defaultproperties
00081	{
00082	     onotext=Texture'XIIICine.effets.Baommm'
00083	     CWndAppearFX=1
00084	     CWndSoundType=0
00085	}

End Source Code