Class JuggleAction
Example action to give contributors a starting point. This action simulates the player juggling some number of objects with a chance to drop each frame. Inherits from ActionTemplate which implements basics of IQuestAction.
Implements
Inherited Members
Namespace: DaggerfallWorkshop.Game.Questing.Actions
Assembly: Assembly-CSharp.dll
Syntax
public class JuggleAction : ActionTemplate, IDisposable, IQuestAction
Constructors
| Improve this Doc View SourceJuggleAction(Quest)
Constructor must set parent quest.
Declaration
public JuggleAction(Quest parentQuest)
Parameters
Type | Name | Description |
---|---|---|
Quest | parentQuest | Quest this action belongs to. Can be null for template. |
Properties
| Improve this Doc View SourcePattern
Signature is used to match action source and retrieve parameter values. You need to provide this so action can be tested and factoried as required. See Regex.Match docs for more: https://msdn.microsoft.com/en-us/library/twcw2f1c(v=vs.110).aspx Example match: "juggle 5 apples every 2 seconds drop 40%"
Declaration
public override string Pattern { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
Methods
| Improve this Doc View SourceCreateNew(String, Quest)
Create is called when action is factoried during parse time. Any setup required should be checked and instantiated from here. If anything prevents action from starting, please throw or log descriptive information.
Declaration
public override IQuestAction CreateNew(string source, Quest parentQuest)
Parameters
Type | Name | Description |
---|---|---|
String | source | Source line. |
Quest | parentQuest |
Returns
Type | Description |
---|---|
IQuestAction | New quest action from this template or null if not created. |
Overrides
| Improve this Doc View SourceGetSaveData()
Gets save data for action serialization.
Declaration
public override object GetSaveData()
Returns
Type | Description |
---|---|
Object | Data packet with action state to save. |
Overrides
| Improve this Doc View SourceRestoreSaveData(Object)
Restores deserialized state back to action.
Declaration
public override void RestoreSaveData(object dataIn)
Parameters
Type | Name | Description |
---|---|---|
Object | dataIn | Data packet with action state to load. |
Overrides
| Improve this Doc View SourceUpdate(Task)
Update is called by owning task once per frame as part of quest machine tick. Update is only called by task if active conditions are met. Perform any updates required here.
Declaration
public override void Update(Task caller)
Parameters
Type | Name | Description |
---|---|---|
Task | caller | Task hosting this action. |