Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 |
/****************************************************************************** xTeamMaterialSwitch Creation date: 2010-07-07 10:30 Last change: $Id$ Copyright © 2010, Wormbo Website: http://www.koehler-homepage.de/Wormbo/ Feel free to reuse this code. Send me a note if you found it helpful or want to report bugs/provide improvements. Please ask for permission first, if you intend to make money off reused code. ******************************************************************************/ class xTeamMaterialSwitch extends xTeamBanner hidecategories(xTeamBanner); //============================================================================= // Properties //============================================================================= /** A MaterialSwitch with 4 materials: red, blue, neutral and disabled */ var() editconst editinline export MaterialSwitch MaterialSwitch; // editinline+export = create copy of subobject /** Combiners to apply the team symbols to. The symbol material is applied to Material2. */ var() Combiner TeamSymbolCombiners[2]; simulated function PostBeginPlay() { Super(Decoration).PostBeginPlay(); } simulated function UpdateForTeam() { MaterialSwitch.Current = Min(Team, MaterialSwitch.Materials.Length - 1); MaterialSwitch.Material = MaterialSwitch.Materials[MaterialSwitch.Current]; if (GRI != None && Team < 2 && GRI.TeamSymbols[Team] != None && TeamSymbolCombiners[Team] != None) TeamSymbolCombiners[Team].Material2 = GRI.TeamSymbols[Team]; } //============================================================================= // Default values //============================================================================= defaultproperties { DrawType = DT_Sprite Texture = Texture'Engine.S_MaterialTrigger' Mesh = None bCollideActors = False bHidden = True Begin Object Class=ConstantColor Name=RedTeamColor Color = (R=255,G=0,B=0,A=255) End Object Begin Object Class=ConstantColor Name=BlueTeamColor Color = (R=32,G=64,B=255,A=255) End Object Begin Object Class=ConstantColor Name=NeutralColor Color = (R=192,G=192,B=192,A=255) End Object Begin Object Class=ConstantColor Name=DisabledColor Color = (R=64,G=64,B=64,A=255) End Object Begin Object Class=MaterialSwitch Name=TeamSwitch Materials = (RedTeamColor,BlueTeamColor,NeutralColor,DisabledColor) End Object MaterialSwitch = MaterialSwitch'TeamSwitch' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |