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

MojoActions.TsAction


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
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
// Base class for all actions
class TsAction extends MojoCore.TsMojoAction
	abstract
	native
	hidecategories(Object)
	collapsecategories;

var string			DName;
var string			Track;
var string			Help;
var bool			FastForwardSkip;
var bool			ModifiesLocation;
var bool			DisableInMojo;
var bool			UsesDuration;

var private config bool	bShowSubtitles;

var transient float interpTime;
var const transient noexport int interpolator;	// alloc'd native interpolator class

//----------------------------------------------
// Inherit "On" functions to implement actions

// Called when action begins
//	return false to end action
function bool OnStart()
{
	return true;
}

// Called each frame
//	return false to end action
function bool OnTick(float delta)
{
	return false;
}

// Called when action ends
//	this will occur when OnTick() returns false
function OnFinish()
{
}

//----------------------------------------------
// Mojo query functions

// return the length of this action.  
// Default zero length for point actions
function float GetLength()
{
	return 0.0f;
}

// Derived classes return a summary string.  
// This can contain information based on attributes.
function string GetSummaryString()
{
	return DName;
}

//----------------------------------------------
// Event control, usually inherit "On" functions

// Event called when action begins
//	return false to end action
function bool Start()
{
	return OnStart();
}

// Event called each frame
//	return false to end action
function bool Tick(float delta)
{
	return OnTick(delta);
}

// Event called when action ends
//	this will occur when Tick() returns false
function Finish()
{
	OnFinish();
}

// Event called when a message is received from a MessageRouter
function Message(Message msg)
{
}

//---------------------------------------------------
// No need to derive these, since
// they query attributes
function string GetNameString()
{
	return DName;
}

function string GetTrackString()
{
	return Track;
}

function string GetHelpString()
{
	return Help;
}

event bool CanFastForwardSkip()
{
	return FastForwardSkip;
}

event bool CanSetDuration()
{
	return UsesDuration;
}

event bool ModifiesActorLocation()
{
	return ModifiesLocation;
}

event bool DisableActionInMojo()
{
	return DisableInMojo;
}

//-----------------------------------------------------------------------------
// resetInterpolation
//
// Resets the interpolation state of this action.
//-----------------------------------------------------------------------------
native function resetInterpolation(float easeIn, float duration, float easeOut);

//-----------------------------------------------------------------------------
// tickInterpolation
//
// Does interpolation processing for a particular tick. Returns false when
// interpolation is finished.
//-----------------------------------------------------------------------------
native function bool tickInterpolation(float delta, out float alpha);

native function bool ShouldShowSubtitles();

// Derived classes should override this attributes
defaultproperties
{
	DName		="<action>"
	Track		="<track>"
	Help		="Action abstract base class"

	FastForwardSkip = false
	ModifiesLocation = false
	DisableInMojo = false
	UsesDuration = false
	ShowSubtitles = false
}




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