Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

# MojoCore.TsMojoAction

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

    class TsMojoAction extends Core.Object
    	abstract native;

    import class Engine.Actor;

    // The Actor object we are manipulating. This member is set by the native framework
    var const transient actor Actor;

    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    // noexport vars (declared in UTsMojoAction.h). Must go after UC vars, and the sizeof this var block
    // must match the sizeof vars added in the C++ header
    //
    //	NOTE: bool defs must NOT be placed sequentially, or else uscript will pack them into a single 4 byte
    //	block, causing the uscript class size to mismatch the C++ defs
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    var const transient private noexport bool	m_skip_action;
    var const transient private noexport Object m_source_key;
    var const transient private noexport Object m_output_key;
    var const transient private noexport Object m_group;
    var const transient private noexport float m_start_time;
    var const transient private noexport float m_offset;
    var const transient private noexport float m_predicted_start_time;
    var const transient private noexport float m_recorded_length;
    var const transient private noexport bool	m_length_dirty;
    var const transient private noexport Array<TsMojoAction> m_subaction_list;
    var const transient private noexport float m_subaction_offset;
    var const transient private noexport TsMojoAction m_subaction_parent;
    var const transient private noexport int m_subaction_track;
    ///////////////////////////////////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    // Extended property defs
    // ---------------------------------------------------------------------------------------------------
    // These properties are scanned for by the mojo tool, and when found, an extended editing interface is
    // exposed
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    struct native MojoKeyframe
    {
    	var() vector	position;
    	var() rotator	rotation;
    };

    struct native MojoTimedKeyframe
    {
    	var() vector	position;
    	var() rotator	rotation;
    	var() float		time;
    };

    struct native MojoAnimation
    {
    	var() name	name;
    	var() name	animation_set;
    };

    struct native MojoActorRef
    {
    	var() name	name;
    	var transient Actor actor;
    };

    function final MojoActorRef ResolveActorRef(MojoActorRef ref)
    {
    	local Actor find_actor;

    	ref.actor = None;
    	ForEach Actor.AllActors(class'Actor', find_actor)
    	{
    		if (find_actor.name == ref.name)
    		{
    			ref.actor = find_actor;
    			break;
    		}
    	}

    	return ref;
    }
    ///////////////////////////////////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    // Base interface
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    event bool Start();
    event bool Tick(float delta);
    event Finish();
    event bool EndCutscene()
    {
    	return false;
    }
    ///////////////////////////////////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    // Editor Interface
    ///////////////////////////////////////////////////////////////////////////////////////////////////////
    // we provide some default strings, or else the event calls will fail on FindFunctionChecked
    event string GetNameString()	{ return "action"; }
    event string GetTrackString()	{ return "track"; }
    event string GetHelpString()	{ return "help me, i'm a fish"; }
    event string GetSummaryString()	{ return "nothing"; }

    // used to filter actions so that not all actions appear on all actors
    event bool CanBeUsedWith(Actor actor)
    {
    	return true;
    }

    // used to find actions that can be skipped during fastforward
    event bool CanFastForwardSkip()
    {
    	return false;
    }

    // indicates we can set the actions duration directly
    event bool CanSetDuration()
    {
    	return false;
    }

    // can be used to determine if an action will move an actor
    event bool ModifiesActorLocation()
    {
    	return false;
    }

    // indicates the action should not play in mojo (eg for change level actions)
    event bool DisableActionInMojo()
    {
    	return false;
    }

    // indicates the action is a subaction, to be kept in lockstep with some other action
    event bool IsSubaction()
    {
    	return false;
    }

    // indicates that the action can accept subactions
    event bool CanAcceptSubactions()
    {
    	return true;
    }

    // indicates that output keys can be created from this action
    event bool CanGenerateOutputKeys()
    {
    	return true;
    }

    // OnDelete
    // Called by the mojo UI when it deletes the action
    event OnDelete()
    {
    }

    event Interrupt()	{}
    event Pause()		{}
    event Resume()		{}
    event bool SetDuration(float duration) { return false; }
    event float GetDuration() { return -1; }
    ///////////////////////////////////////////////////////////////////////////////////////////////////////

Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
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.472 - Created with UnCodeX