// BOLT

        public override void OnEvent(ShowKartDisplayItem evnt)
        {
            var entity = GetComponentInParent <BoltEntity>();

            if (entity == evnt.Entity)
            {
                Direction direction = (Direction)evnt.Direction;
                _itemDisplayer.DisplayItem(evnt.ItemName, evnt.ItemCount, direction);
            }
        }
Exemple #2
0
        public void SendShowDisplayEvent()
        {
            var showDisplayEvent = ShowKartDisplayItem.Create(GlobalTargets.Everyone);

            showDisplayEvent.Entity    = GetComponentInParent <BoltEntity>();
            showDisplayEvent.ItemName  = _inventory.CurrentItem != null ? _inventory.CurrentItem.Name : "";
            showDisplayEvent.ItemCount = _inventory.CurrentItemCount;
            showDisplayEvent.Direction = (int)_throwingDirection.LastDirectionUp;
            showDisplayEvent.Send();
        }
Exemple #3
0
        // BOLT

        public override void OnEvent(ShowKartDisplayItem evnt)
        {
            var entity = GetComponentInParent <BoltEntity>();

            if (entity == evnt.Entity)
            {
                if (evnt.ItemCount > 0)
                {
                    DisplayEmissive(evnt.ItemName);
                }
                else
                {
                    HideEmissive();
                }
            }
        }