Ejemplo n.º 1
0
        public DamagePerHit(IClassDefinition classInfo)
        {
            var data = SpellCalculator.CalculateHitData(classInfo);

            this.MinValue = data.From;
            this.MaxValue = data.To;

            // TODO: Return IsMax when Maxxed !!!
            this.BonusMinValue = Math.Min(60, Convert.ToInt32(classInfo.AncestralPower / 2));
            this.BonusMaxValue = Math.Min(120, classInfo.AncestralPower);
        }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     spellCalc      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <SpellCalculator>();
     spellName      = gameObject.transform.Find("ActiveSpell").GetComponent <Text>();
     forceValue     = gameObject.transform.Find("ForceValue").GetComponent <Text>();
     pierceValue    = gameObject.transform.Find("PierceValue").GetComponent <Text>();
     toughnessValue = gameObject.transform.Find("ToughnessValue").GetComponent <Text>();
     resistValue    = gameObject.transform.Find("ResistanceValue").GetComponent <Text>();
     offensiveTotal = gameObject.transform.Find("OffensiveTotal").GetComponent <Text>();
     defensiveTotal = gameObject.transform.Find("DefensiveTotal").GetComponent <Text>();
     spellCost      = gameObject.transform.Find("SpellCost").GetComponent <Text>();
 }
Ejemplo n.º 3
0
    SpellCalculator calcScript;                                                             //reference to the relevant players spell calculator

    private void Start()
    {
        typeButton = gameObject.GetComponent <Button>();
        typeButton.image.sprite = notSelected;
        calcScript = GameObject.Find("Player1").GetComponentInChildren <SpellCalculator>();      //find the object for the owner player and in its children there should be a spell calculator
    }
Ejemplo n.º 4
0
    SpellCalculator calcScript;                                                 //reference to the spell calculator to pass slider value for spell calculations

    void Start()
    {
        powerSlider = this.GetComponent <Slider>();
        calcScript  = GameObject.Find("Player1").GetComponentInChildren <SpellCalculator>();    //find the object for the owner player and in its children there should be a spell calculator
    }