示例#1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="hf"></param>
    private void showHF(HF hf)
    {
        playerPref.gold += hf.gold;
        save();
        // show achievement in Google Games
        if (Social.localUser.authenticated)
        {
            Social.ReportProgress(hf.id, 100.0f, (bool success) => { });
        }

        achievementPanel.GetComponentsInChildren <Text>()[0].text = hf.description;
        achievementPanel.GetComponentsInChildren <Text>()[1].text = "+" + hf.gold;
        // show panel
        achievementPanel.SetActive(true);
        foreach (Image img in achievementPanel.GetComponentsInChildren <Image>())
        {
            img.CrossFadeAlpha(1, 0.5f, false);
        }
        foreach (Text text in achievementPanel.GetComponentsInChildren <Text>())
        {
            text.CrossFadeAlpha(1, 0.5f, false);
        }
        // dismiss in 2 secondes
        Invoke("dismissAchivement", 2);
    }
示例#2
0
        private void B_HF_Click(object sender, EventArgs e)
        {
            HF hf = new HF();

            hf.ShowDialog();
            timer1_Tick(sender, e);
        }
示例#3
0
        public override string LegendsDescription()
        {
            string timestring = base.LegendsDescription();

            return(string.Format("{0} {1} came back from the dead as a {2} in {3}.",
                                 timestring, HF.ToString(), Ghost, Site.AltName));
        }
示例#4
0
        public override string LegendsDescription()
        {
            string timestring = base.LegendsDescription();

            return(string.Format("{0} {1} {2} {3}.",
                                 timestring, HF.ToString(), "UNKNOWN", HFTarget.ToString()));
        }
示例#5
0
        internal override string ToTimelineString()
        {
            string timelinestring = base.ToTimelineString();

            return(string.Format("{0} {1} was entombed at {2}.",
                                 timelinestring, HF.ToString(), Site.AltName));
        }
示例#6
0
        internal override string ToTimelineString()
        {
            string timelinestring = base.ToTimelineString();

            return(string.Format("{0} {1} got immortality goal.",
                                 timelinestring, HF.ToString()));
        }
示例#7
0
        internal override string ToTimelineString()
        {
            string timelinestring = base.ToTimelineString();

            return(string.Format("{0} {1} {2} {3}.",
                                 timelinestring, HF != null ? HF.ToString() : HFID.ToString(), " linked to ", HFTarget != null ? HFTarget.ToString() : HFIDTarget.ToString()));
        }
示例#8
0
    public void UpdateHealthUI()
    {
        healthText.text = "Health: " + currentHealth + "/" + maxHealth;
        foreach (Transform child in HealthUI.transform)
        {
            Destroy(child.gameObject);
        }
        for (int i = 0; i < currentHealth; i++)
        {
            GameObject HF;
            HF = Instantiate(
                HealthFull,
                new Vector3(0f, 0f, 0f),
                transform.rotation) as GameObject;
            HF.transform.SetParent(HealthUI.transform);
            RectTransform RT = HF.GetComponent <RectTransform>();
            RT.localPosition = new Vector3(32 + (64 * i), -32, 0);
        }

        for (int i = currentHealth; i < maxHealth; i++)
        {
            GameObject HE;
            HE = Instantiate(
                HealthEmpty,
                new Vector3(0f, 0f, 0f),
                transform.rotation) as GameObject;
            HE.transform.SetParent(HealthUI.transform);
            RectTransform RT = HE.GetComponent <RectTransform>();
            RT.localPosition = new Vector3(32 + (64 * i), -32, 0);
        }
    }
示例#9
0
        internal override string ToTimelineString()
        {
            string timelinestring = base.ToTimelineString();

            if (Site == null)
            {
                if (SlayerHF == null)
                {
                    return(string.Format("{0} {1} died.",
                                         timelinestring, HF != null ? HF.ToString() : HFID.ToString()));
                }
                else
                {
                    return(string.Format("{0} {1} killed by {2}.",
                                         timelinestring, HF != null ? HF.ToString() : HFID.ToString(), SlayerHF.ToString()));
                }
            }
            else
            {
                if (SlayerHF == null)
                {
                    return(string.Format("{0} {1} died at {2}",
                                         timelinestring, HF != null ? HF.ToString() : HFID.ToString(), Site.AltName));
                }
                else
                {
                    return(string.Format("{0} {1} killed at {2} by {3}",
                                         timelinestring, HF != null ? HF.ToString() : HFID.ToString(), Site.AltName, SlayerHF.ToString()));
                }
            }
        }
示例#10
0
        public override string LegendsDescription()
        {
            string timestring = base.LegendsDescription();

            return(string.Format("{0} {1} was entombed in {2} within {3}.",
                                 timestring, HF.ToString(), Site.AltName, "BUILDING " + BuildingID.ToString()));
        }
示例#11
0
        public override string LegendsDescription()
        {
            string timestring = base.LegendsDescription();

            return(string.Format("{0} {1} {2} became {3} in {4}.",
                                 timestring, HF.Race.ToString(), HF.ToString(), "UNKNOWN",
                                 Site.AltName));
        }
示例#12
0
        protected override string LegendsDescription()
        {
            var timestring = base.LegendsDescription();

            return(string.Format("{0} {1} became {2} of {3}.",
                                 timestring, HF == null ? "UNKNOWN" : HF.ToString(),
                                 LinkType ?? "UNKNOWN", Civ));
        }
        internal override string ToTimelineString()
        {
            string timelinestring = base.ToTimelineString();

            return(string.Format("{0} {1} constructed a masterful arch for {2} at {3}.",
                                 timelinestring, HF.ToString(), Entity.ToString(),
                                 Site.AltName));
        }
示例#14
0
        public override string LegendsDescription()
        {
            string timestring = base.LegendsDescription();

            return(string.Format("{0} {1} became obsessed with {2} own mortality and sought to extend {2} life by any means.",
                                 timestring, HF.ToString(),
                                 HF.Caste.HasValue ? (HistoricalFigure.Castes[HF.Caste.Value].ToLower() == "female" ? "her" : "his") : "his"));
        }
示例#15
0
        internal override string ToTimelineString()
        {
            string timelinestring = base.ToTimelineString();

            return(string.Format("{0} {1} masterfully improved an item for {2} at {3}.",
                                 timelinestring, HF.ToString(), Entity.ToString(),
                                 Site.AltName));
        }
示例#16
0
        private void TaskPanelBlock_Loaded(object sender, RoutedEventArgs e)
        {
            //testblock.image.Fill = GetImageBrush("Resource/img/Pysk_hover.png");
            testblock.image.Fill = HF.GIB("DevelNextIco.png");
            testblock.notif.Fill = new SolidColorBrush(Color.FromArgb(100, 255, 255, 0));

            MenuPysk.notif.Fill = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
        }
示例#17
0
        public override string LegendsDescription()
        {
            string timestring = base.LegendsDescription();

            return(string.Format("{0} {1} became {2} of {3}.",
                                 timestring, HF == null ? "UNKNOWN" : HF.ToString(),
                                 LinkType == null ? "UNKNOWN" : LinkType, Site.AltName));
        }
        public override string LegendsDescription()
        {
            string timestring = base.LegendsDescription();

            return(string.Format("{0} {1} constructed a masterful {2} for {3} at {4}.",
                                 timestring, HF.ToString(), "UNKNOWN", Entity.ToString(),
                                 Site.AltName));
        }
示例#19
0
 public override string ToString()
 {
     if (HF == null)
     {
         return(LinkType + ": " + LinkedHFID);
     }
     else
     {
         return(LinkType + ": " + HF.ToString());
     }
 }
示例#20
0
        internal override string ToTimelineString()
        {
            var timelinestring = base.ToTimelineString();

            if (Site != null)
            {
                return(string.Format("{0} {1} came back from the dead as a {2} in {3}*",
                                     timelinestring, HF != null ? HF.ToString() : HFID.ToString(), Ghost, Site.AltName));
            }
            return(string.Format("{0} {1} came back from the dead as a {2}",
                                 timelinestring, HF != null ? HF.ToString() : HFID.ToString(), Ghost));
        }
 protected void grd_DSUserOfRole_BeforePerformDataSelect(object sender, EventArgs e)
 {
     if (!HF.Contains("collapsedRowKey"))
     {
         ASPxGridView grd_DSUserOfRole = sender as ASPxGridView;
         Object       objKey           = grd_DSUserOfRole.GetMasterRowKeyValue();
         String[]     str    = objKey.ToString().Split('|');
         Int32        idRole = Convert.ToInt32(str[0]);
         Role         role   = ctlRole.getRolesByID(idRole);
         grd_DSUserOfRole.DataSource = role.Users;
     }
 }
 protected void grd_DSRoleOfUser_BeforePerformDataSelect(object sender, EventArgs e)
 {
     if (!HF.Contains("collapsedRowKey"))
     {
         ASPxGridView grd_DSUsers = sender as ASPxGridView;
         Object       objKey      = grd_DSUsers.GetMasterRowKeyValue();
         String[]     str         = objKey.ToString().Split('|');
         Int32        idUser      = Convert.ToInt32(str[0]);
         User         user        = ctlUser.getUsersByID(idUser);
         grd_DSUsers.DataSource = user.Roles;
     }
 }
示例#23
0
 public void OnMidiNote(MidiInfo info)
 {
     if (module == Modules.Oscillator)
     {
         oscCurrentPhase = 0;
         frequency       = HF.MidiToFrequency(info.note);
     }
     else if (module == Modules.Envelope)
     {
         envCounter = 0;
         maxVolume  = info.velocity / 127;
     }
 }
示例#24
0
        internal override string ToTimelineString()
        {
            var timelinestring = base.ToTimelineString();

            if (Site != null)
            {
                return(string.Format("{0} {1} changed jobs at {2}",
                                     timelinestring, HF != null ? HF.ToString() : HFID.ToString(),
                                     Site.AltName));
            }
            return(string.Format("{0} {1} changed jobs",
                                 timelinestring, HF != null ? HF.ToString() : HFID.ToString()));
        }
示例#25
0
        private void CountFamilies()
        {
            foreach (var HF in HistoricalFigures.Values)
            {
                HF.CountAncestors();
            }
            foreach (var HF in HistoricalFigures.Values)
            {
                HF.CountDescendents();
            }

            OnFamiliesCounted();
        }
示例#26
0
        internal override string ToTimelineString()
        {
            string timelinestring = base.ToTimelineString();

            if (Reason == "murder" && Situation == "general suspicion")
                return string.Format("{0} {1} aroused general suspicion in {2} after a murder.",
                    timelinestring, HF.ToString(),
                    Site.AltName);
            else if (Reason == "ageless" && Situation == "general suspicion")
                return string.Format("{0} {1} aroused general suspicion in {2} after appearing not to age.",
                    timelinestring, HF.ToString(),
                    Site.AltName);
            else
                return timelinestring;
        }
示例#27
0
        public override string LegendsDescription()
        {
            string timestring = base.LegendsDescription();

            if (Reason == "murder" && Situation == "general suspicion")
                return string.Format("{0} {1} aroused general suspicion in {2} after a murder.",
                    timestring, HF.ToString(),
                    Site.AltName);
            else if (Reason == "ageless" && Situation == "general suspicion")
                return string.Format("{0} {1} aroused general suspicion in {2} after appearing not to age.",
                    timestring, HF.ToString(),
                    Site.AltName);
            else
                return timestring;
        }
示例#28
0
        internal override string ToTimelineString()
        {
            string timelinestring = base.ToTimelineString();

            if (HF != null && LinkType != null)
            {
                return(string.Format("{0} {1} became {2} of {3}.",
                                     timelinestring, HF.ToString(),
                                     LinkType, Site.AltName));
            }
            else
            {
                return(string.Format("{0} Added Site Link to {1}.",
                                     timelinestring, Site.AltName));
            }
        }
示例#29
0
        private void ConfiguraSaida_Load(object sender, EventArgs e)
        {
            txtNomeSaida.Text = Nome;

            cboTipo.DisplayMember = "Nome";
            cboTipo.ValueMember   = "Tipo";

            cboTipo.Items.Add(new TipoItem {
                Nome = "Manual", Tipo = "M"
            });
            cboTipo.Items.Add(new TipoItem {
                Nome = "Agendado", Tipo = "A"
            });
            cboTipo.Items.Add(new TipoItem {
                Nome = "Pulso", Tipo = "P"
            });

            if (TS == String.Empty)
            {
                TS = "M";
            }

            if (TS == "M")
            {
                cboTipo.SelectedIndex = 0;
            }
            else if (TS == "A")
            {
                cboTipo.SelectedIndex = 1;
            }
            else if (TS == "P")
            {
                cboTipo.SelectedIndex = 2;
            }



            gbAgendamento.Enabled = (TS == "A");
            gbPulso.Enabled       = (TS == "P");

            txtHI.Text = HI.ToString();
            txtMI.Text = MI.ToString();
            txtHF.Text = HF.ToString();
            txtMF.Text = MF.ToString();

            txtPulso.Text = SP.ToString();
        }
        internal override string ToTimelineString()
        {
            var timelinestring = base.ToTimelineString();

            if (!ConcluderHFID.HasValue)
            {
                return(string.Format("{0} {1} performed ritual at {2} with {3}.",
                                     timelinestring,
                                     HF != null ? HF.ToString() : "UNKNOWN",
                                     Site != null ? Site.ToString() : "UNKNOWN",
                                     Artifact != null ? Artifact.ToString() : "UNKNOWN"));
            }
            else
            {
                return(string.Format("{0} Agreement formed",
                                     timelinestring
                                     ));
            }
        }