Beispiel #1
0
 /// <summary>
 /// Called continously when a custom attack action is playing. Return false to stop the action.
 /// </summary>
 /// <param name="secondsPassed"></param>
 /// <param name="slot"></param>
 /// <param name="byEntity"></param>
 /// <param name="blockSelection"></param>
 /// <param name="entitySel"></param>
 /// <param name="handling"></param>
 /// <returns></returns>
 public virtual bool OnHeldAttackStep(float secondsPassed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSelection, EntitySelection entitySel, ref EnumHandHandling handling)
 {
     handling = EnumHandHandling.NotHandled;
     return(false);
 }
Beispiel #2
0
 /// <summary>
 /// When the player has begun using this item for attacking (left mouse click). Return true to play a custom action.
 /// </summary>
 /// <param name="slot"></param>
 /// <param name="byEntity"></param>
 /// <param name="blockSel"></param>
 /// <param name="entitySel"></param>
 /// <param name="handHandling"></param>
 /// <param name="handling"></param>
 /// <returns></returns>
 public virtual void OnHeldAttackStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, ref EnumHandHandling handHandling, ref EnumHandHandling handling)
 {
     handHandling = EnumHandHandling.NotHandled;
 }
Beispiel #3
0
 /// <summary>
 /// Called when the player right clicks while holding this block/item in his hands
 /// </summary>
 /// <param name="slot"></param>
 /// <param name="byEntity"></param>
 /// <param name="blockSel"></param>
 /// <param name="entitySel"></param>
 /// <param name="handHandling"></param>
 /// <param name="handling"></param>
 /// <returns></returns>
 public virtual void OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, bool firstEvent, ref EnumHandHandling handHandling, ref EnumHandling handling)
 {
     handling = EnumHandling.PassThrough;
 }
Beispiel #4
0
 /// <summary>
 /// Called when the player successfully completed the using action, not called when successfully cancelled
 /// </summary>
 /// <param name="secondsUsed"></param>
 /// <param name="slot"></param>
 /// <param name="byEntity"></param>
 /// <param name="blockSel"></param>
 /// <param name="entitySel"></param>
 /// <param name="handling"></param>
 public virtual void OnHeldInteractStop(float secondsUsed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, ref EnumHandling handling)
 {
     handling = EnumHandling.PassThrough;
     return;
 }
Beispiel #5
0
 /// <summary>
 /// Called when a custom attack action is finished
 /// </summary>
 /// <param name="secondsPassed"></param>
 /// <param name="slot"></param>
 /// <param name="byEntity"></param>
 /// <param name="blockSelection"></param>
 /// <param name="entitySel"></param>
 /// <param name="handling"></param>
 public virtual void OnHeldAttackStop(float secondsPassed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSelection, EntitySelection entitySel, ref EnumHandHandling handling)
 {
     handling = EnumHandHandling.NotHandled;
 }