Ejemplo n.º 1
0
 void Start()
 {
     currentHp = 5;
     setInitialPosition();
     currentColor = GroupColor.none;
     StartCoroutine(hpDecrease());
 }
Ejemplo n.º 2
0
    public void runBubbleActions()
    {
        GroupColor cColor = this.currentColor;

        if (expired == true)
        {
            foreach (Bubble bubble in bubbles)
            {
                bubble.kill();
            }

            foreach (Bomb bomb in bombs)
            {
                if (bomb.currentStatus != BombStatus.death)
                {
                    bomb.timeUp();
                }
            }


            if (currentHp <= 0)
            {
                try
                {
                    RoundEnd(this);
                }
                catch
                {
                    //no se asigno delegado
                }
            }



            return;
        }

        if (cColor != GroupColor.none)
        {
            if (touches[(int)cColor] == maxTouches[(int)cColor])
            {
                foreach (Bubble bubble in bubbles)
                {
                    if (bubble.bubbleColor == cColor)
                    {
                        Vector3 position = bubble.gameObject.transform.position;
                        starExplotion(position);
                        bubble.kill();
                    }
                }
                colorStatus[(int)currentColor] = 0;
                this.currentColor = GroupColor.none;
            }

            if (checkGeneralStatus() == true && this != null)
            {
                RoundEnd(this);
            }
        }
    }
    // Use this for initialization
    void Start()
    {
        //set a random color
        Vector4 color = GroupColor.GetClampedRandomColor(0.4f);

        GetComponent <SpriteRenderer>().color = color;

        gameObject.tag = "Player";
    }
Ejemplo n.º 4
0
    public void setColor(GroupColor color)
    {
        this.bubbleColor = color;

        switch (color)
        {
        case (GroupColor.blue):
        {
            sRenderer.sprite     = (Sprite)Resources.Load <Sprite>("BlueBubble") as Sprite;
            starSRenderer.sprite = (Sprite)Resources.Load <Sprite>("starBlue") as Sprite;
            break;
        }

        case (GroupColor.black):
        {
            sRenderer.sprite     = (Sprite)Resources.Load <Sprite>("BlackBubble") as Sprite;
            starSRenderer.sprite = (Sprite)Resources.Load <Sprite>("starBlack") as Sprite;
            break;
        }

        case (GroupColor.green):
        {
            sRenderer.sprite     = (Sprite)Resources.Load <Sprite>("GreenBubble") as Sprite;
            starSRenderer.sprite = (Sprite)Resources.Load <Sprite>("starGreen") as Sprite;
            break;
        }

        case (GroupColor.red):
        {
            sRenderer.sprite     = (Sprite)Resources.Load <Sprite>("RedBubble") as Sprite;
            starSRenderer.sprite = (Sprite)Resources.Load <Sprite>("starRed") as Sprite;
            break;
        }

        case (GroupColor.yellow):
        {
            sRenderer.sprite     = (Sprite)Resources.Load <Sprite>("YellowBubble") as Sprite;
            starSRenderer.sprite = (Sprite)Resources.Load <Sprite>("starYellow") as Sprite;
            break;
        }

        case (GroupColor.purple):
        {
            sRenderer.sprite     = (Sprite)Resources.Load <Sprite>("PurpleBubble") as Sprite;
            starSRenderer.sprite = (Sprite)Resources.Load <Sprite>("starPurple") as Sprite;
            break;
        }
        }

        starSRenderer.color = new Color(255, 255, 255);
    }
Ejemplo n.º 5
0
    private void UntouchInnerBubble(GroupColor bubbleColor)
    {
        if (currentTouches > 0)
        {
            currentTouches            = currentTouches - 1;
            touches[(int)bubbleColor] = touches[(int)bubbleColor] - 1;
        }


        if (touches[(int)bubbleColor] <= 0)
        {
            currentColor = GroupColor.none;
            touches[(int)bubbleColor] = 0;
        }
    }
Ejemplo n.º 6
0
    private void TouchInnerBubble(GroupColor bubbleColor)
    {
        currentTouches = currentTouches + 1;

        if (currentColor == GroupColor.none)
        {
            touches[(int)bubbleColor] = touches[(int)bubbleColor] + 1;
            currentColor = bubbleColor;
            runBubbleActions();
        }
        else
        {
            if (this.currentColor == bubbleColor)
            {
                touches[(int)bubbleColor] = touches[(int)bubbleColor] + 1;
                runBubbleActions();
            }
        }
    }
Ejemplo n.º 7
0
        public void Save()
        {
            if (_filestream == null)
            {
                return;
            }


            var xml = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), new XElement("window"));

            xml.Root.Add(new XElement("location"));
            xml.Root.Element("location").Add(new XElement("x", Location.X.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Element("location").Add(new XElement("y", Location.Y.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Add(new XElement("language", Language));
            xml.Root.Add(new XElement("ui_language", UILanguage));
            xml.Root.Add(new XElement("opacity"));
            xml.Root.Element("opacity").Add(new XElement("mainWindow", MainWindowOpacity * 100));
            xml.Root.Element("opacity").Add(new XElement("skillWindow", SkillWindowOpacity * 100));
            xml.Root.Add(new XElement("autoupdate", AutoUpdate));
            xml.Root.Add(new XElement("remember_position", RememberPosition));
            xml.Root.Add(new XElement("winpcap", Winpcap));
            xml.Root.Add(new XElement("invisible_ui_when_no_stats", InvisibleUi));
            xml.Root.Add(new XElement("allow_transparency", AllowTransparency));
            xml.Root.Add(new XElement("topmost", Topmost));
            xml.Root.Add(new XElement("debug", Debug));
            xml.Root.Add(new XElement("excel", Excel));
            xml.Root.Add(new XElement("excel_path_template", ExcelPathTemplate));
            xml.Root.Add(new XElement("excel_save_directory", ExcelSaveDirectory));
            xml.Root.Add(new XElement("excel_cma_dps_seconds", ExcelCMADPSSeconds));
            xml.Root.Add(new XElement("always_visible", AlwaysVisible));
            xml.Root.Add(new XElement("scale", Scale.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Add(new XElement("lf_delay", LFDelay));
            xml.Root.Add(new XElement("partyonly", PartyOnly));
            xml.Root.Add(new XElement("showhealcrit", ShowHealCrit));
            xml.Root.Add(new XElement("showtimeleft", ShowTimeLeft));
            xml.Root.Add(new XElement("show_crit_damage_rate", ShowCritDamageRate));
            xml.Root.Add(new XElement("detect_bosses_only_by_hp_bar", DetectBosses));
            xml.Root.Add(new XElement("only_bosses", OnlyBoss));
            xml.Root.Add(new XElement("low_priority", LowPriority));
            xml.Root.Add(new XElement("number_of_players_displayed", NumberOfPlayersDisplayed));
            xml.Root.Add(new XElement("meter_user_on_top", MeterUserOnTop));
            xml.Root.Add(new XElement("remove_tera_alt_enter_hotkey", RemoveTeraAltEnterHotkey));
            xml.Root.Add(new XElement("enable_chat_and_notifications", EnableChat));
            xml.Root.Add(new XElement("mute_sound", MuteSound));
            xml.Root.Add(new XElement("copy_inspect", CopyInspect));
            xml.Root.Add(new XElement("format_paste_string", FormatPasteString));
            xml.Root.Add(new XElement("say_color", SayColor.ToString()));
            xml.Root.Add(new XElement("alliance_color", AllianceColor.ToString()));
            xml.Root.Add(new XElement("area_color", AreaColor.ToString()));
            xml.Root.Add(new XElement("guild_color", GuildColor.ToString()));
            xml.Root.Add(new XElement("whisper_color", WhisperColor.ToString()));
            xml.Root.Add(new XElement("general_color", GeneralColor.ToString()));
            xml.Root.Add(new XElement("group_color", GroupColor.ToString()));
            xml.Root.Add(new XElement("trading_color", TradingColor.ToString()));
            xml.Root.Add(new XElement("emotes_color", EmotesColor.ToString()));
            xml.Root.Add(new XElement("private_channel_color", PrivateChannelColor.ToString()));
            xml.Root.Add(new XElement("disable_party_event", DisablePartyEvent));
            xml.Root.Add(new XElement("show_afk_events_ingame", ShowAfkEventsIngame));
            xml.Root.Add(new XElement("idle_reset_timeout", IdleResetTimeout));

            xml.Root.Add(new XElement("teradps.io"));
            xml.Root.Element("teradps.io").Add(new XElement("user", TeraDpsUser));
            xml.Root.Element("teradps.io").Add(new XElement("token", TeraDpsToken));
            xml.Root.Element("teradps.io").Add(new XElement("enabled", SiteExport));
            xml.Root.Element("teradps.io").Add(new XElement("private_servers", new XAttribute("enabled", PrivateServerExport)));
            PrivateDpsServers.ForEach(x =>
                                      xml.Root.Element("teradps.io").Element("private_servers").Add(new XElement("server", x))
                                      );

            _filestream.SetLength(0);
            using (var sw = new StreamWriter(_filestream, new UTF8Encoding(true)))
            {
                sw.Write(xml.Declaration + Environment.NewLine + xml);
            }
            _filestream.Close();
        }
Ejemplo n.º 8
0
 // Token: 0x060000E1 RID: 225 RVA: 0x0000D420 File Offset: 0x0000B620
 public ClanView(int groupId, int membersCount, string description, string name, string motto, string address, DateTime foundingDate, string picture, GroupType type, DateTime lastUpdated, string tag, int membersLimit, GroupColor colorStyle, GroupFontStyle fontStyle, int applicationId, int ownerCmid, string ownerName, List <ClanMemberView> members) : base(groupId, membersCount, description, name, motto, address, foundingDate, picture, type, lastUpdated, tag, membersLimit, colorStyle, fontStyle, applicationId, ownerCmid, ownerName)
 {
     this.Members = members;
 }
Ejemplo n.º 9
0
        public void Save()
        {
            if (_filestream == null)
            {
                return;
            }


            var xml = new XDocument(new XElement("window"));

            xml.Root.Add(new XElement("location"));
            xml.Root.Element("location").Add(new XElement("x", Location.X.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Element("location").Add(new XElement("y", Location.Y.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Add(new XElement("language", Language));
            xml.Root.Add(new XElement("ui_language", UILanguage));
            xml.Root.Add(new XElement("opacity"));
            xml.Root.Element("opacity").Add(new XElement("mainWindow", MainWindowOpacity * 100));
            xml.Root.Element("opacity").Add(new XElement("skillWindow", SkillWindowOpacity * 100));
            xml.Root.Add(new XElement("autoupdate", AutoUpdate));
            xml.Root.Add(new XElement("remember_position", RememberPosition));
            xml.Root.Add(new XElement("winpcap", Winpcap));
            xml.Root.Add(new XElement("invisible_ui_when_no_stats", InvisibleUi));
            xml.Root.Add(new XElement("allow_transparency", AllowTransparency));
            xml.Root.Add(new XElement("topmost", Topmost));
            xml.Root.Add(new XElement("teradps.io"));
            xml.Root.Element("teradps.io").Add(new XElement("user", TeraDpsUser));
            xml.Root.Element("teradps.io").Add(new XElement("token", TeraDpsToken));
            xml.Root.Element("teradps.io").Add(new XElement("enabled", SiteExport));
            xml.Root.Add(new XElement("debug", Debug));
            xml.Root.Add(new XElement("excel", Excel));
            xml.Root.Add(new XElement("date_in_excel_path", DateInExcelPath));
            xml.Root.Add(new XElement("excel_save_directory", ExcelSaveDirectory));
            xml.Root.Add(new XElement("always_visible", AlwaysVisible));
            xml.Root.Add(new XElement("scale", Scale.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Add(new XElement("lf_delay", LFDelay));
            xml.Root.Add(new XElement("partyonly", PartyOnly));
            xml.Root.Add(new XElement("showhealcrit", ShowHealCrit));
            xml.Root.Add(new XElement("detect_bosses_only_by_hp_bar", DetectBosses));
            xml.Root.Add(new XElement("only_bosses", OnlyBoss));
            xml.Root.Add(new XElement("low_priority", LowPriority));
            xml.Root.Add(new XElement("number_of_players_displayed", NumberOfPlayersDisplayed));

            xml.Root.Add(new XElement("notify_sound", NotifySound));
            xml.Root.Add(new XElement("volume", Volume));
            xml.Root.Add(new XElement("popup_display_time", PopupDisplayTime));
            xml.Root.Add(new XElement("sound_notify_duration", SoundNotifyDuration));

            xml.Root.Add(new XElement("say_color", SayColor.ToString()));
            xml.Root.Add(new XElement("alliance_color", AllianceColor.ToString()));
            xml.Root.Add(new XElement("area_color", AreaColor.ToString()));
            xml.Root.Add(new XElement("guild_color", GuildColor.ToString()));
            xml.Root.Add(new XElement("whisper_color", WhisperColor.ToString()));
            xml.Root.Add(new XElement("general_color", GeneralColor.ToString()));
            xml.Root.Add(new XElement("group_color", GroupColor.ToString()));
            xml.Root.Add(new XElement("trading_color", TradingColor.ToString()));
            xml.Root.Add(new XElement("emotes_color", EmotesColor.ToString()));
            xml.Root.Add(new XElement("private_channel_color", PrivateChannelColor.ToString()));
            xml.Root.Add(new XElement("remove_tera_alt_enter_hotkey", RemoveTeraAltEnterHotkey));
            xml.Root.Add(new XElement("enable_chat_and_notifications", EnableChat));
            xml.Root.Add(new XElement("copy_inspect", CopyInspect));

            _filestream.SetLength(0);
            using (var sr = new StreamWriter(_filestream))
            {
                // File writing as usual
                sr.Write(xml);
            }
            _filestream.Close();
        }
Ejemplo n.º 10
0
        public void Save()
        {
            if (_filestream == null)
            {
                return;
            }


            var xml = new XDocument(new XDeclaration("1.0", "utf-8", "yes"), new XElement("window"));

            xml.Root.Add(new XElement("location"));
            xml.Root.Element("location").Add(new XElement("x", Location.X.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Element("location").Add(new XElement("y", Location.Y.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Add(new XElement("language", Language));
            xml.Root.Add(new XElement("ui_language", UILanguage));
            xml.Root.Add(new XElement("opacity"));
            xml.Root.Element("opacity").Add(new XElement("mainWindow", MainWindowOpacity * 100));
            xml.Root.Element("opacity").Add(new XElement("skillWindow", SkillWindowOpacity * 100));
            xml.Root.Add(new XElement("autoupdate", AutoUpdate));
            xml.Root.Add(new XElement("remember_position", RememberPosition));
            xml.Root.Add(new XElement("winpcap", Winpcap));
            xml.Root.Add(new XElement("invisible_ui_when_no_stats", InvisibleUi));
            xml.Root.Add(new XElement("allow_transparency", AllowTransparency));
            xml.Root.Add(new XElement("topmost", Topmost));
            xml.Root.Add(new XElement("debug", Debug));
            xml.Root.Add(new XElement("excel", Excel));
            xml.Root.Add(new XElement("date_in_excel_path", DateInExcelPath));
            xml.Root.Add(new XElement("excel_save_directory", ExcelSaveDirectory));
            xml.Root.Add(new XElement("excel_cma_dps_seconds", ExcelCMADPSSeconds));
            xml.Root.Add(new XElement("always_visible", AlwaysVisible));
            xml.Root.Add(new XElement("scale", Scale.ToString(CultureInfo.InvariantCulture)));
            xml.Root.Add(new XElement("lf_delay", LFDelay));
            xml.Root.Add(new XElement("partyonly", PartyOnly));
            xml.Root.Add(new XElement("showhealcrit", ShowHealCrit));
            xml.Root.Add(new XElement("detect_bosses_only_by_hp_bar", DetectBosses));
            xml.Root.Add(new XElement("only_bosses", OnlyBoss));
            xml.Root.Add(new XElement("low_priority", LowPriority));
            xml.Root.Add(new XElement("number_of_players_displayed", NumberOfPlayersDisplayed));
            xml.Root.Add(new XElement("remove_tera_alt_enter_hotkey", RemoveTeraAltEnterHotkey));
            xml.Root.Add(new XElement("enable_chat_and_notifications", EnableChat));
            xml.Root.Add(new XElement("mute_sound", MuteSound));
            xml.Root.Add(new XElement("copy_inspect", CopyInspect));
            xml.Root.Add(new XElement("format_paste_string", FormatPasteString));
            xml.Root.Add(new XElement("say_color", SayColor.ToString()));
            xml.Root.Add(new XElement("alliance_color", AllianceColor.ToString()));
            xml.Root.Add(new XElement("area_color", AreaColor.ToString()));
            xml.Root.Add(new XElement("guild_color", GuildColor.ToString()));
            xml.Root.Add(new XElement("whisper_color", WhisperColor.ToString()));
            xml.Root.Add(new XElement("general_color", GeneralColor.ToString()));
            xml.Root.Add(new XElement("group_color", GroupColor.ToString()));
            xml.Root.Add(new XElement("trading_color", TradingColor.ToString()));
            xml.Root.Add(new XElement("emotes_color", EmotesColor.ToString()));
            xml.Root.Add(new XElement("private_channel_color", PrivateChannelColor.ToString()));
            xml.Root.Add(new XElement("disable_party_event", DisablePartyEvent));
            xml.Root.Add(new XElement("show_afk_events_ingame", ShowAfkEventsIngame));

            xml.Root.Add(new XElement("teradps.io"));
            xml.Root.Element("teradps.io").Add(new XElement("user", TeraDpsUser));
            xml.Root.Element("teradps.io").Add(new XElement("token", TeraDpsToken));
            xml.Root.Element("teradps.io").Add(new XElement("enabled", SiteExport));
            xml.Root.Element("teradps.io").Add(new XElement("private_servers", new XAttribute("enabled", PrivateServerExport)));
            PrivateDpsServers.ForEach(x =>
                                      xml.Root.Element("teradps.io").Element("private_servers").Add(new XElement("server", x))
                                      );



            xml.Root.Add(new XElement("discord"));
            xml.Root.Element("discord").Add(new XElement("login", DiscordLogin));
            xml.Root.Element("discord").Add(new XElement("password", DiscordPassword));
            xml.Root.Element("discord").Add(new XElement("guilds"));
            foreach (var discordData in DiscordInfoByGuild)
            {
                var name = discordData.Key.ToString().ToLowerInvariant();
                xml.Root.Element("discord").Element("guilds").Add(new XElement(name));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("guild_infos_channel", discordData.Value.DiscordChannelGuildInfo));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("guild_quests_channel", discordData.Value.DiscordChannelGuildQuest));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("server", discordData.Value.DiscordServer));

                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("guild_infos_text", discordData.Value.GuildInfosText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("quest_infos_text", discordData.Value.QuestInfoText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("quest_list_infos_text", discordData.Value.QuestListInfoText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("quest_list_infos_header_text", discordData.Value.QuestListHeaderText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("reward_footer_text", discordData.Value.RewardFooterText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("reward_content_text", discordData.Value.RewardContentText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("reward_header_text", discordData.Value.RewardHeaderText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("target_header_text", discordData.Value.TargetHeaderText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("target_content_text", discordData.Value.TargetContentText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("target_footer_text", discordData.Value.TargetFooterText));
                xml.Root.Element("discord").Element("guilds").Element(name).Add(new XElement("no_active_quest_text", discordData.Value.QuestNoActiveText));
            }


            _filestream.SetLength(0);
            using (var sw = new StreamWriter(_filestream, new UTF8Encoding(true)))
            {
                sw.Write(xml.Declaration + Environment.NewLine + xml);
            }
            _filestream.Close();
        }
Ejemplo n.º 11
0
 // Token: 0x06000063 RID: 99 RVA: 0x0000D090 File Offset: 0x0000B290
 public void SetClan(int groupId, int membersCount, string description, string name, string motto, string address, DateTime foundingDate, string picture, GroupType type, DateTime lastUpdated, string tag, int membersLimit, GroupColor colorStyle, GroupFontStyle fontStyle, int applicationId, int ownerCmid, string ownerName)
 {
     this.GroupId       = groupId;
     this.MembersCount  = membersCount;
     this.Description   = description;
     this.Name          = name;
     this.Motto         = motto;
     this.Address       = address;
     this.FoundingDate  = foundingDate;
     this.Picture       = picture;
     this.Type          = type;
     this.LastUpdated   = lastUpdated;
     this.Tag           = tag;
     this.MembersLimit  = membersLimit;
     this.ColorStyle    = colorStyle;
     this.FontStyle     = fontStyle;
     this.ApplicationId = applicationId;
     this.OwnerCmid     = ownerCmid;
     this.OwnerName     = ownerName;
 }