Exemplo n.º 1
0
 override protected void Start()
 {
     manager = Object.FindObjectOfType <TurnManager>();
     panel   = Object.FindObjectOfType <GUIPanel>();
     PopupTextController.Initialize();
     creatureMechanics = GetComponent <CreatureMechanics>();
     selectedAction    = GetComponent <ActionBasicAttack>();
     //gameSignal = (GameSignalOneObject)Resources.Load("Game Signals/SetConcentration", typeof(GameSignalOneObject));
     base.Start();
 }
Exemplo n.º 2
0
        // ... more data related to the character displayed information.

        public void UpdateData(CreatureMechanics creature)
        {
            textName.text  = creature.displayName;
            textSpeed.text = kSpeed + creature.Speed;
            // ... Update other stuff

            var isAi = creature.GetComponent <EnemyController>() != null;

            textName.color = isAi ? Color.red : Color.blue;
        }
Exemplo n.º 3
0
 public void DisplayStats(CreatureMechanics unit)
 {
     dodgeValueText.text    = unit.DodgeChance() + " %";
     backstabValueText.text = unit.BonusRearDamageMin() + "-" + unit.BonusRearDamageMax();
     damageValueText.text   = unit.MinDamage() + "-" + unit.MaxDamage();
     accValueText.text      = unit.HitChance() + " %";
     critValueText.text     = unit.CritChance() + " %";
     lifeValueText.text     = unit.LifeString();
     staminaValueText.text  = unit.StaminaString();
     nameValueText.text     = unit.displayName;
 }
Exemplo n.º 4
0
 // Some status effects have varying power levels, others default to -1
 public StatusEffect(EffectType effectType, int durationRounds, ObjectMechanics effectTarget, int effectPowerLevel = -1)
 {
     // Only CreatureMechanics can get status effects.
     if (effectTarget.GetType() == typeof(ObjectMechanics))
     {
         return;
     }
     roundsRemaining = durationRounds;
     type            = effectType;
     target          = (CreatureMechanics)effectTarget;
     powerLevel      = effectPowerLevel;
     target.RegisterStatusEffect(this);
 }
Exemplo n.º 5
0
 // Start is called before the first frame update
 virtual protected void Start()
 {
     combatController = GetComponent <CombatController>();
     anim             = GetComponentInChildren <Animator>();
     mechanics        = GetComponent <CreatureMechanics>();
 }