當前位置: 首頁>>代碼示例>>C#>>正文


C# PlayerMobile.RevealingAction方法代碼示例

本文整理匯總了C#中Server.Mobiles.PlayerMobile.RevealingAction方法的典型用法代碼示例。如果您正苦於以下問題:C# PlayerMobile.RevealingAction方法的具體用法?C# PlayerMobile.RevealingAction怎麽用?C# PlayerMobile.RevealingAction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobiles.PlayerMobile的用法示例。


在下文中一共展示了PlayerMobile.RevealingAction方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Shoot

        private static void Shoot(PlayerMobile from, Mobile target, INinjaWeapon weapon)
        {
            if (from != target && CanUseWeapon(from, weapon) && from.CanBeHarmful(target))
            {
                if (weapon.WeaponMinRange == 0 || !from.InRange(target, weapon.WeaponMinRange))
                {
                    from.NinjaWepCooldown = true;

                    from.Direction = from.GetDirectionTo(target);

                    from.RevealingAction();

                    weapon.AttackAnimation(from, target);

                    ConsumeUse(weapon);

                    if (CombatCheck(from, target))
                    {
                        Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback<object[]>(OnHit), new object[] { from, target, weapon });
                    }

                    Timer.DelayCall(TimeSpan.FromSeconds(2.5), new TimerStateCallback<PlayerMobile>(ResetUsing), from);
                }
                else
                {
                    from.SendLocalizedMessage(1063303); // Your target is too close!
                }
            }
        }
開發者ID:jasegiffin,項目名稱:JustUO,代碼行數:29,代碼來源:NinjaWeapons.cs

示例2: Release

        public void Release(PlayerMobile pm, GovernmentEntity g)
        {
            if( !(GovernmentEntity.IsGuildOfficer(pm, g)) )
            {
                pm.SendMessage("Only officers may order a resource to be abandoned.");
                return;
            }

            pm.RevealingAction();
            pm.SendMessage("You order the " + this.Resource.ToString() + " to be abandoned by " + this.Government.Name.ToString() + ".");
            Owned = false;
            Name = BaseName;
            Government = null;
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:14,代碼來源:ResourceNode.cs

示例3: Claim

        public void Claim(PlayerMobile pm, GovernmentEntity g)
        {
            if (Government != null && !Government.Deleted && Government == g)
            {
                pm.SendMessage(g.Name.ToString() + " already owns this resource.");
                return;
            }

            if (m_ClaimantGovernment != null && !m_ClaimantGovernment.Deleted && m_ClaimantGovernment == g)
            {
                pm.SendMessage(g.Name.ToString() + " is already laying claim to this resource.");
                return;
            }

            if (Owned && (DateTime.Now < m_LastCapture + TimeSpan.FromDays(1)) )
            {
                pm.SendMessage("It is too soon to claim this resource.");
                return;
            }

            if (Owned && ( DateTime.Now < (pm.LastDeath + TimeSpan.FromHours(1)) ) )
            {
                pm.SendMessage("You have been injured in the last hour. Try resting before attempting to claim these resources.");
                return;
            }

            if (!CustomGuildStone.IsGuildOfficer(pm, g))
            {
                pm.SendMessage("Only officers of " + g.Name.ToString() + " may claim resources.");
                return;
            }

            pm.RevealingAction();

            m_Claimant = pm;
            m_ClaimantGovernment = g;
            m_ClaimTimer = new ClaimResourceTimer(this);
            m_ClaimTimer.Start();

            if (m_Government != null && !m_Government.Deleted)
            {
                bool nodeThief = true;

                foreach (CustomGuildStone c in CustomGuildStone.Guilds)
                {
                    if (CustomGuildStone.IsGuildMember(pm, c))
                    {
                        if (m_Government.AlliedGuilds.Contains(c))
                        {
                            nodeThief = false;
                            continue;
                        }
                    }
                }

                if (nodeThief)
                {
                    XmlAttachment attachment = null;
                    attachment = XmlAttach.FindAttachmentOnMobile(pm, typeof(XmlCriminal), m_Government.Nation.ToString());

                    if (attachment == null)
                    {
                        XmlAttach.AttachTo(pm, new XmlCriminal(m_Government.Nation));
                        pm.SendMessage(Soldier.CriminalAlertMessage(m_Government.Nation));

                        pm.RevealingAction();
                    }
                }
            }

            m_Claimant.SendMessage("You begin laying claim to the " + Resource.ToString() + " in the name of " + m_ClaimantGovernment.Name.ToString() + ".");
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:72,代碼來源:ResourceNode.cs


注:本文中的Server.Mobiles.PlayerMobile.RevealingAction方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。