예제 #1
0
        private void cbbClasses_SelectedIndexChanged(object sender, EventArgs e)
        {
            CharacterClass selected = (CharacterClass)cbbClasses.SelectedIndex;
            currentClass = classes.Find(x => x.ClassType == selected);
            if (currentClass != null)
            {
                cbbResourceType.SelectedIndex = (int)currentClass.ResourceType;

                txtBaseHP.Text = currentClass.BaseHP.ToString();
                txtBaseRes.Text = currentClass.BaseMana.ToString();
                txtBaseSta.Text = currentClass.BaseStamina.ToString();

                txtHpRegen.Text = currentClass.HealthRegen.ToString();
                txtResRegen.Text = currentClass.ManaRegen.ToString();
                txtStaRegen.Text = currentClass.StaminaRegen.ToString();

                txtBaseAgi.Text = currentClass.BaseAgility.ToString();
                txtBaseDex.Text = currentClass.BaseDexterity.ToString();
                txtBaseSpi.Text = currentClass.BaseSpirit.ToString();
                txtBaseStr.Text = currentClass.BaseStrength.ToString();

                txtLevelAgi.Text = currentClass.AgilityPerLevel.ToString();
                txtLevelDex.Text = currentClass.DexterityPerLevel.ToString();
                txtLevelHp.Text = currentClass.HpPerLevel.ToString();
                txtLevelRes.Text = currentClass.ManaPerLevel.ToString();
                txtLevelSpi.Text = currentClass.SpiritPerLevel.ToString();
                txtLevelSta.Text = currentClass.StaminaPerLevel.ToString();
                txtLevelStr.Text = currentClass.StrengthPerLevel.ToString();
            }
            else
            {
                currentClass = new ClassInformation();
                currentClass.ClassType = selected;
                classes.Add(currentClass);
            }
        }
예제 #2
0
        private void StartupVariables()
        {
            RunningCost = 10;
            Equipment = new EquipmentSlots();
            Stats = new CharacterStats();
            Stats.Equipment = Equipment;
            CollisionRadius = 25f;
            movementInterval = 20f;
            AttackDelay = 300;
            Class = new ClassInformation();
            Skills = new List<Skill>();
            StatusEffects = new List<StatusEffect>();
            OnHitEffects = new List<StatusEffect>();
            Inventory = new Inventory();
            ComboManager = new ComboManager {Attacks = 2, CurrentAttackIndex = 0};

            Melee = new Weapon
            {
                AttackAngle = 180,
                AttackRange = 30,
                AttackPower = 5,
                Cooldown = 700f,
                Name = "None"
            };

            Facing = Direction.Down;
            Behavior = new BehaviorEngine();
            Name = string.Empty;
            ActionState = ActionState.Idle;
            IsAlive = true;
        }
예제 #3
0
        public void SetClass(ClassInformation classInformation)
        {
            Class = classInformation;

            Stats.MaxHp = classInformation.BaseHP;
            Stats.MaxMana = classInformation.BaseMana;
            Stats.MaxStamina = classInformation.BaseStamina;

            Stats.BaseAgility = classInformation.BaseAgility;
            Stats.BaseDexterity = classInformation.BaseDexterity;
            Stats.BaseSpirit = classInformation.BaseSpirit;
            Stats.BaseStrength = classInformation.BaseStrength;

            Stats.Hp = Stats.MaxHp;
            Stats.Mana = Stats.MaxMana;
            Stats.Stamina = Stats.MaxStamina;
        }