Esempio n. 1
0
        public Enemy(Dictionary <string, Animation> _animations, int cellSize, int level, float speed, float timeBetweenActions, Map map, String name)
        {
            Level = level;
            calculateBaseStatistics();

            this._animations        = _animations;
            this.timeBetweenActions = timeBetweenActions;
            timer              = 0;
            Speed              = speed; // TODO: move it to calculateStatistics()
            _animationManager  = new AnimationManager(_animations.First().Value);
            CellX              = (int)Math.Floor(Center.X / cellSize);
            CellY              = (int)Math.Floor(Center.Y / cellSize);
            CurrentCell        = map.GetCell(CellX, CellY);
            currentActionState = ActionState.Standing;
            currentHealthState = HealthState.Normal;
            Name = name;
            setAttacks();
            Inventory = new List <Item>();
        }
Esempio n. 2
0
        public Boss(Dictionary <string, Animation> _animations, int cellSize, int level, float timeBetweenActions, Map map, List <Cell> cells)
        {
            Level = level;
            calculateBaseStatistics();
            currentActionState      = ActionState.Attacking;
            currentHealthState      = HealthState.Normal;
            this._animations        = _animations;
            this.timeBetweenActions = timeBetweenActions;
            _animationManager       = new AnimationManager(_animations.First().Value);
            actionTimer             = 0;

            this.map       = map;
            CellX          = (int)Math.Floor(Center.X / cellSize);
            CellY          = (int)Math.Floor(Center.Y / cellSize);
            occupyingCells = cells;
            Name           = "Demon Oak";

            Inventory = new List <Item>();

            SetAttack();
        }