mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 09:32:38 +00:00
add consts for triggers
This commit is contained in:
parent
c9a0d8a4de
commit
9d663894ac
@ -26,6 +26,15 @@ public class AnimationSync : PlayerSyncObject
|
||||
public Animator InvisibleAnimator { get; private set; }
|
||||
public NetworkAnimator NetworkAnimator { get; private set; }
|
||||
|
||||
public const string HOLD_LANTERN_TRIGGER = "HoldLantern";
|
||||
public const string HOLD_SHARED_STONE_TRIGGER = "HoldSharedStone";
|
||||
public const string HOLD_SCROLL_TRIGGER = "HoldScroll";
|
||||
public const string HOLD_WARP_CORE_TRIGGER = "HoldWarpCore";
|
||||
public const string HOLD_VESSEL_CORE_TRIGGER = "HoldAdvWarpCore";
|
||||
public const string HOLD_CONVERSATION_STONE_TRIGGER = "HoldItem";
|
||||
public const string DROP_HELD_ITEM = "DropHeldItem";
|
||||
public const string TAUNT_THUMBS_UP = "ThumbsUp";
|
||||
|
||||
protected void Awake()
|
||||
{
|
||||
InvisibleAnimator = gameObject.GetRequiredComponent<Animator>();
|
||||
|
@ -1,4 +1,5 @@
|
||||
using QSB.CampfireSync.WorldObjects;
|
||||
using QSB.Animation.Player;
|
||||
using QSB.CampfireSync.WorldObjects;
|
||||
using QSB.ItemSync.WorldObjects.Items;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
@ -23,7 +24,7 @@ internal class BurnSlideReelMessage : QSBWorldObjectMessage<QSBSlideReelItem, in
|
||||
campfire._burnedSlideReelSocket,
|
||||
campfire._sector, null);
|
||||
fromPlayer.HeldItem = null;
|
||||
fromPlayer.AnimationSync.VisibleAnimator.SetTrigger("DropHeldItem");
|
||||
fromPlayer.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.DROP_HELD_ITEM);
|
||||
WorldObject.AttachedObject.Burn();
|
||||
campfire.SetDropSlideReelMode(false);
|
||||
campfire._hasBurnedSlideReel = true;
|
||||
|
@ -1,4 +1,5 @@
|
||||
using QSB.ItemSync.WorldObjects;
|
||||
using QSB.Animation.Player;
|
||||
using QSB.ItemSync.WorldObjects;
|
||||
using QSB.ItemSync.WorldObjects.Items;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
@ -69,6 +70,6 @@ internal class DropItemMessage : QSBWorldObjectMessage<IQSBItem,
|
||||
|
||||
var player = QSBPlayerManager.GetPlayer(From);
|
||||
player.HeldItem = null;
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger("DropHeldItem");
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.DROP_HELD_ITEM);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
using QSB.ItemSync.WorldObjects.Items;
|
||||
using QSB.Animation.Player;
|
||||
using QSB.ItemSync.WorldObjects.Items;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
using QSB.Utility;
|
||||
@ -39,27 +40,27 @@ internal class MoveToCarryMessage : QSBWorldObjectMessage<IQSBItem, uint>
|
||||
switch (itemType)
|
||||
{
|
||||
case ItemType.Scroll:
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger("HoldScroll");
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.HOLD_SCROLL_TRIGGER);
|
||||
break;
|
||||
case ItemType.WarpCore:
|
||||
if (((QSBWarpCoreItem)WorldObject).IsVesselCoreType())
|
||||
{
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger("HoldAdvWarpCore");
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.HOLD_VESSEL_CORE_TRIGGER);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger("HoldWarpCore");
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.HOLD_WARP_CORE_TRIGGER);
|
||||
}
|
||||
|
||||
break;
|
||||
case ItemType.SharedStone:
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger("HoldSharedStone");
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.HOLD_SHARED_STONE_TRIGGER);
|
||||
break;
|
||||
case ItemType.ConversationStone:
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger("HoldItem");
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.HOLD_CONVERSATION_STONE_TRIGGER);
|
||||
break;
|
||||
case ItemType.Lantern:
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger("HoldLantern");
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.HOLD_LANTERN_TRIGGER);
|
||||
break;
|
||||
case ItemType.SlideReel:
|
||||
case ItemType.DreamLantern:
|
||||
|
@ -1,4 +1,5 @@
|
||||
using QSB.ItemSync.WorldObjects.Items;
|
||||
using QSB.Animation.Player;
|
||||
using QSB.ItemSync.WorldObjects.Items;
|
||||
using QSB.ItemSync.WorldObjects.Sockets;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
@ -33,7 +34,7 @@ internal class SocketItemMessage : QSBMessage<(SocketMessageType Type, int Socke
|
||||
|
||||
var player = QSBPlayerManager.GetPlayer(From);
|
||||
player.HeldItem = null;
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger("DropHeldItem");
|
||||
player.AnimationSync.VisibleAnimator.SetTrigger(AnimationSync.DROP_HELD_ITEM);
|
||||
return;
|
||||
}
|
||||
case SocketMessageType.StartUnsocket:
|
||||
|
Loading…
x
Reference in New Issue
Block a user