예제 #1
0
파일: Wizard.cs 프로젝트: Czahyl/MOBA
        public Wizard(string Username, int TeamID)
            : base(Username, TeamID)
        {
            BaseHealth = 75;
            Health = BaseHealth;
            maxHealth = (BaseHealth * Level) + HealthStat;

            BaseMana = 125;
            Mana = BaseMana;
            maxMana = (BaseMana * Level) + ManaStat;

            nameplate = new Nameplate(this);
            Animations.Add("Attack", new Animation(5));
            Animations.Add("Idle", new Animation(5));

            idle = Animations["Idle"];
            attack = Animations["Attack"];

            currentAni = new Animation(5);

            idle.buffer.Add(Main.Assets.getTexture(5));
            attack.buffer.Add(Main.Assets.getTexture(6));

            currentAni = idle;

            Attack = 10 + AttackPower;
            SpellPower = 15;

            ability.Add(new Fireball(this));
        }
예제 #2
0
파일: Player.cs 프로젝트: Czahyl/MOBA
        public Player(string Username, int TeamID)
        {
            if (Username.Length > 8 /* or allowed length */) // TODO: Make a checkname() method in server class
            {
                for (int i = 0; i < 8; i++)
                {
                    Name += Username[i]; //Cap the username at 8 characters
                }
            }
            else
            {
                Name = Username;
            }

            Width = 60;
            Height = 100;

            ability = new List<Ability>();

            debuffList = new List<Debuff>();
            buffList = new List<Buff>();

            Regen = new Timer(5, false);

            currentAni = new Animation(5);

            currentAni.buffer.Add(Main.Assets.getTexture(0));

            Team = TeamID;
            Level = 1;
            Exp = 0;
            MoveSpeed = 1f;
            Health = 100;
            BaseHealth = 100;
            maxHealth = (BaseHealth * Level) + HealthStat;
            HP5 = 3;
            Mana = 100;
            BaseMana = 100;
            maxMana = (BaseMana * Level) + ManaStat;
            MP5 = 3;
            visionLayer = 0;
            defaultLayer = visionLayer;
            Bounds = new Rectangle((int)Position.X, (int)Position.Y, Width, Height);
            light = new LightEmitter();

            nameplate = new Nameplate(this);

            autoAttack = new List<Autoattack>();

            AttackSpeed = 0.5f;

            attackDelay = new Timer(AttackSpeed, false);
        }