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