Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Gameplay.SkinInfo


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
// This class defines data used to build the selection of skins available to a user at an inventory station
// Skin authors should inherit from the class and store the new classes in the skin's package file
class SkinInfo extends Engine.Info
	native;

var() Array<Material>	meshSkins;
var() Array<Material>	jetpackSkins;
var() Array<Material>	armsSkins;
var() Mesh				applicableMesh;

// applies the skin to a character.
// the default SkinInfo class should set the character's skin to defaults.
static function applyToCharacter(Actor c)
{
	local int i;

	// clear existing skin settings
	for (i = 0; i < c.skins.Length; i++)
		c.skins[i] = None;
	
	// set new skin
	for (i = 0; i < default.meshSkins.Length; i++)
		c.Skins[i] = default.meshSkins[i];
}

static function applyToJetpack(Actor j)
{
	local int i;

	// clear existing skin settings
	for (i = 0; i < j.skins.Length; i++)
		j.skins[i] = None;
	
	// set new skin
	for (i = 0; i < default.jetpackSkins.Length; i++)
		j.Skins[i] = default.jetpackSkins[i];
}

static function applyToArms(Actor a)
{
	local int i;

	// clear existing skin settings
	for (i = 0; i < a.skins.Length; i++)
		a.skins[i] = None;
	
	// set new skin
	for (i = 0; i < default.armsSkins.Length; i++)
		a.Skins[i] = default.armsSkins[i];
}

// returns true if the skin class can be used with the given team and role
static function bool isApplicable(Mesh mesh)
{
	return mesh == default.applicableMesh;
}

// loads all skin info objects from the skins directory
native static function loadAllSkins(LevelInfo l);

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 15:53:14.000 - Creation time: st 23.5.2018 00:10:47.105 - Created with UnCodeX