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


C# Player.setBarrowKillCount方法代碼示例

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


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

示例1: killBrother

 public static void killBrother(Player p, int id)
 {
     for (int i = 0; i < BROTHER_ID.Length; i++) {
         if (id == BROTHER_ID[i]) {
             p.setBarrowBrothersKilled(i, true);
             p.setBarrowKillCount(p.getBarrowKillCount() + 1);
             p.getPackets().modifyText("Kill Count: "+p.getBarrowKillCount(), 24, 0);
             break;
         }
     }
 }
開發者ID:Krill156,項目名稱:SharpEMU,代碼行數:11,代碼來源:Barrows.cs

示例2: updateVariables


//.........這裏部分代碼省略.........
                    bool allBrothersKilled = true;
                    for (int i = 0; i < 6; i++)
                    {
                        if (!p.getBarrowBrothersKilled(i))
                        {
                            allBrothersKilled = false;
                        }
                    }
                    if (allBrothersKilled)
                    {
                        Barrows.startEarthQuake(p);
                    }
                }
            }
            else
            {
                if (p.getTemporaryAttribute("atBarrows") != null)
                {
                    bool allBrothersKilled = true;
                    for (int i = 0; i < 6; i++)
                    {
                        if (!p.getBarrowBrothersKilled(i))
                        {
                            allBrothersKilled = false;
                        }
                    }
                    if (allBrothersKilled)
                    {
                        for (int i = 0; i < 6; i++)
                        {
                            p.setBarrowBrothersKilled(i, false);

                            p.setBarrowTunnel(-1);
                            p.setBarrowKillCount(0);
                            p.getPackets().resetCamera();
                            p.removeTemporaryAttribute("lootedBarrowChest");
                        }
                        p.getPackets().resetCamera();
                        p.getPackets().sendRemoveOverlay();
                        p.removeTemporaryAttribute("atBarrows");
                        p.removeTemporaryAttribute("barrowTunnel");
                        p.getPackets().setMinimapStatus(0);
                        Barrows.removeBrotherFromGame(p);
                    }
                }
                if (Location.atGodwars(p.getLocation()))
                {
                    if (p.getTemporaryAttribute("atGodwars") == null)
                    {
                        p.getPackets().sendOverlay(601);
                        p.setTemporaryAttribute("atGodwars", true);
                    }
                }
                else
                {
                    if (p.getTemporaryAttribute("atGodwars") != null)
                    {
                        p.getPackets().sendRemoveOverlay();
                        p.removeTemporaryAttribute("atGodwars");
                    }
                }
                if (Location.atAgilityArena(p.getLocation()))
                {
                    if (p.getTemporaryAttribute("atAgilityArena") == null)
                    {
                        p.getPackets().sendOverlay(5);
開發者ID:Krill156,項目名稱:SharpEMU,代碼行數:67,代碼來源:AreaVariables.cs


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