ActionInstant.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <Type Name="ActionInstant" FullName="Urho.Actions.ActionInstant">
  2. <TypeSignature Language="C#" Value="public class ActionInstant : Urho.Actions.FiniteTimeAction" />
  3. <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ActionInstant extends Urho.Actions.FiniteTimeAction" />
  4. <AssemblyInfo>
  5. <AssemblyName>Urho</AssemblyName>
  6. <AssemblyVersion>1.0.0.0</AssemblyVersion>
  7. </AssemblyInfo>
  8. <Base>
  9. <BaseTypeName>Urho.Actions.FiniteTimeAction</BaseTypeName>
  10. </Base>
  11. <Interfaces />
  12. <Docs>
  13. <summary>Base class for actions that have an immediate effect.</summary>
  14. <remarks>
  15. <para>This is a base class that will invoke the Update method in the <see cref="T:Urho.Actions.ActionState" /> with the value of one as soon as it is executed.   </para>
  16. <para>The following example shows how you would implement an instant:</para>
  17. <code lang="C#"><![CDATA[public class MyInstant : ActionInstant
  18. {
  19. public MyInstant () {}
  20. protected internal override ActionState StartAction(Node target)
  21. {
  22. return new MyInstantState (this, target);
  23. }
  24. public override FiniteTimeAction Reverse ()
  25. {
  26. return (new MyInstantReverse ());
  27. }
  28. }
  29. public class MyInstantState : ActionInstantState
  30. {
  31. public MyInstantState (MyInstant action, Node target)
  32. : base (action, target) {}
  33. public override void Update (float time)]]></code>
  34. <para>
  35. </para>
  36. <para>In this imaginary action, you there would be an inverse operation called “MyInstantReverse”, which is used to implement the Reverse method in this case.</para>
  37. <para>The “PerformOp” call is the one that does the change, and it will be invoked only once.</para>
  38. </remarks>
  39. </Docs>
  40. <Members>
  41. <Member MemberName=".ctor">
  42. <MemberSignature Language="C#" Value="protected ActionInstant ();" />
  43. <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
  44. <MemberType>Constructor</MemberType>
  45. <AssemblyInfo>
  46. <AssemblyVersion>1.0.0.0</AssemblyVersion>
  47. </AssemblyInfo>
  48. <Parameters />
  49. <Docs>
  50. <summary>Creates a new instance of the instant action</summary>
  51. <remarks>To be added.</remarks>
  52. </Docs>
  53. </Member>
  54. <Member MemberName="Reverse">
  55. <MemberSignature Language="C#" Value="public override Urho.Actions.FiniteTimeAction Reverse ();" />
  56. <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class Urho.Actions.FiniteTimeAction Reverse() cil managed" />
  57. <MemberType>Method</MemberType>
  58. <AssemblyInfo>
  59. <AssemblyVersion>1.0.0.0</AssemblyVersion>
  60. </AssemblyInfo>
  61. <ReturnValue>
  62. <ReturnType>Urho.Actions.FiniteTimeAction</ReturnType>
  63. </ReturnValue>
  64. <Parameters />
  65. <Docs>
  66. <summary>This method must be overwritten and return the reverse action of your custom action.</summary>
  67. <returns>To be added.</returns>
  68. <remarks>To be added.</remarks>
  69. </Docs>
  70. </Member>
  71. <Member MemberName="StartAction">
  72. <MemberSignature Language="C#" Value="protected override Urho.Actions.ActionState StartAction (Urho.Node target);" />
  73. <MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig virtual instance class Urho.Actions.ActionState StartAction(class Urho.Node target) cil managed" />
  74. <MemberType>Method</MemberType>
  75. <AssemblyInfo>
  76. <AssemblyVersion>1.0.0.0</AssemblyVersion>
  77. </AssemblyInfo>
  78. <ReturnValue>
  79. <ReturnType>Urho.Actions.ActionState</ReturnType>
  80. </ReturnValue>
  81. <Parameters>
  82. <Parameter Name="target" Type="Urho.Node" />
  83. </Parameters>
  84. <Docs>
  85. <param name="target">
  86. <para>The new <see cref="T:Urho.Actions.ActionState" /> that encapsulates the state and provides the implementation to perform your action.</para>
  87. </param>
  88. <summary>Creates the action state for this action, called on demand from the framework to start executing the recipe.</summary>
  89. <returns>To be added.</returns>
  90. <remarks>New action that will perform the inverse of this action</remarks>
  91. </Docs>
  92. </Member>
  93. </Members>
  94. </Type>