Esempio n. 1
0
    public void UpdateStats()
    {
        Vector2 ViewportPosition = Camera.main.WorldToViewportPoint(transform.position);

        stats.transform.FindChild("HP").GetComponent <Text>().text  = HP.ToString();
        stats.transform.FindChild("ATT").GetComponent <Text>().text = ATT.ToString();
        stats.transform.FindChild("DEF").GetComponent <Text>().text = DEF.ToString();

        Vector2 WorldObject_ScreenPosition = new Vector2(
            ((ViewportPosition.x * canvasRect.sizeDelta.x) - (canvasRect.sizeDelta.x * 0.5f)),
            ((ViewportPosition.y * canvasRect.sizeDelta.y) - (canvasRect.sizeDelta.y * 0.5f)));

        stats.anchoredPosition = WorldObject_ScreenPosition;
    }
        // View Diagnosis and treatment plans data
        private void ViewDiagnosisAndTreatmentPlans()
        {
            DMF_Value.Text  = DMF.ToString();
            DMF_D.Text      = D.ToString();
            DMF_M.Text      = M.ToString();
            DMF_F.Text      = F.ToString();
            _dmf_value.Text = dmf.ToString();
            _dmf_d.Text     = d.ToString();
            _dmf_m.Text     = m.ToString();
            _dmf_f.Text     = f.ToString();
            DEF_Value.Text  = DEF.ToString();
            DEF_D.Text      = _D.ToString();
            DEF_E.Text      = E.ToString();
            DEF_F.Text      = _F.ToString();

            foreach (List <String> row in DiagnosisAndTPs_table)
            {
                DATP_dataGridView.Rows.Add(row.ToArray());
            }
        }
Esempio n. 3
0
        public string GetData()
        {
            if (this == null)
            {
                return("");
            }
            string result = "";

            result += this.Name;
            if (this.IsMonster())
            {
                result += Environment.NewLine;
                result += this.IsFrame(FRAME.Xyz)
                    ? string.Format("Rank {0}", (double.IsNaN(Rank) ? "?" : Rank.ToString()))
                    : string.Format("Level {0}", (double.IsNaN(Level) ? "?" : Level.ToString()));
                result += " " + this.Attribute.ToString();
                if (Type != TYPE.NONE)
                {
                    result += " " + string.Format("{0}-Type", this.Type.GetString());
                }
                if (this.IsPendulum)
                {
                    result += " Pendulum";
                }
                result += " " + this.Frame;
                if (this.Abilities.Count > 0)
                {
                    result += " " + string.Join(" ", this.Abilities);
                }
                result += " Monster";
                result += Environment.NewLine;
                result += string.Format("ATK {0}\nDEF {1}",
                                        (double.IsNaN(ATK) ? "?" : ATK.ToString()),
                                        (double.IsNaN(DEF) ? "?" : DEF.ToString()));
                if (this.IsPendulum)
                {
                    result += "\nPendulum Scale ";
                    if (ScaleLeft.Equals(ScaleRight))
                    {
                        result += (double.IsNaN(ScaleLeft) ? "?" : ScaleLeft.ToString());
                    }
                    else
                    {
                        result += (double.IsNaN(ScaleLeft) ? "?" : ScaleLeft.ToString());
                        result += "/";
                        result += (double.IsNaN(ScaleRight) ? "?" : ScaleRight.ToString());
                    }
                }
                result += Environment.NewLine;
                if (this.IsPendulum)
                {
                    result += "Pendulum Effect:\n";
                    result += this.PendulumEffect.CleanUpUnnecessarySpace();
                    result += Environment.NewLine;
                    if (this.IsFrame(FRAME.Normal))
                    {
                        result += "Lore:";
                        result += Environment.NewLine;
                    }
                    else
                    {
                        result += "Monster Effect:";
                        result += Environment.NewLine;
                    }
                }
            }
            else
            {
                result += Environment.NewLine;
                if (Property != PROPERTY.NONE && Property != PROPERTY.Normal)
                {
                    result += Property.GetString() + " ";
                }
                result += Frame.ToString() + " Card";
                result += Environment.NewLine;
            }

            result += this.Description.CleanUpUnnecessarySpace();

            return(result);
        }
Esempio n. 4
0
        public string getInfo()
        {
            string stats;

            stats = Name + "\nHealth: " + HLT.ToString() + "\nAttack: " + ATK.ToString() + "\nDefense: " + DEF.ToString()
                    + "\nSpeed: " + SPD.ToString() + "\nEvasiveness: " + EVA.ToString() + "\nCurrent Item: " + CurrentlyHolding + "\n\n";

            return(stats);
        }
Esempio n. 5
0
        // Methods start here

        public string getInfo()
        {
            string stats;

            stats = Name + "\nHealth: " + HLT.ToString() + "\nAttack: " + ATK.ToString() + "\nDefense: " + DEF.ToString()
                    + "\nSpeed: " + SPD.ToString() + "\nEvasiveness: " + EVA.ToString() + "\nFaction: " + Faction + "\n\n";

            return(stats);
        }