Exemple #1
0
        private void LogSpellInPlayerHUD(Spell spell)
        {
            var message = spell.caster.name + " casted " + Spells.EventList[(Spells.SpellID)spell.spellId] + " on you";
            var player  = _MainManager.GetPlayerById(spell.targetedPlayer.id);

            player.SendMessageToPlayerInHUD(message, Color.white);
        }
Exemple #2
0
        public void ActivateSpellMode(messages.Player targetedPlayer)
        {
            var player = m_mainManager.GetPlayerById(targetedPlayer.id).gameObject;

            m_lightningThing.EndObject = player;
            audioSource.Play();
            var light = player.GetComponentInChildren <Light>();

            StartCoroutine(TriggerLightning(light));
        }
Exemple #3
0
        public bool ConsumeInput(GamepadAction input)
        {
            var interactingPlayer = m_mainManager.GetPlayerById(input.GetPlayerId());
            var noOwner           = Owner == null;
            var samePlayer        = Owner.ID == interactingPlayer.ID;

            if (m_started && (noOwner || samePlayer) && CheckPlayerIsNear(interactingPlayer.gameObject))
            {
                if (!noOwner && m_playerHolding.IsHoldingObject())
                {
                    return(false);
                }
                return(TryToConsumeInput(input));
            }
            return(false);
        }