Example #1
0
        public override void Initialize()
        {
            //Animation and images
            texture = ImageManager.HermesIdleSpriteSheet;
            _hermesMovingTexture = ImageManager.HermesMovingSpriteheet;
            deadTexture = ImageManager.BloodTexture;
            animates = true;
            spriteSheetCols = 8;
            spriteSheetRows = 1;
            int movingFrameWidth = _hermesMovingTexture.Width / MovingSheetCols;
            int movingFrameHeight = _hermesMovingTexture.Height;
            for (int i = 0; i < MovingSheetCols; i++)
            {
                _movingFrames[i] = new Rectangle(i * movingFrameWidth, 0, movingFrameWidth, movingFrameHeight);
            }

            //PrimaryWeapon
            range = 450.0f;
            visibleRange = 500.0f;
            PrimaryWeapon = new Laser(gamePlayScreen, this){LaserColour = Color.DarkViolet, LaserThickness = 4};
            //PrimaryWeapon = new Gun(gamePlayScreen, this);
            isArmed = true;

            //Movement and status
            IsInBuildMode = true;
            isInMotion = false;
            destination = Center;
            MaxSpeed = 40f;
            Speed = MaxSpeed;

            //Hit points
            maxHP = 2000;
            startingHP = maxHP;
            currentHP = maxHP;

            //Initialize the draw area as a proportion of the screen size
            width = (int)(gamePlayScreen.VP.Width*0.1f);
            height = (int) (gamePlayScreen.VP.Height*0.15f);

            base.Initialize();
        }
Example #2
0
        public override void Initialize()
        {
            //Animation and images
            texture = ImageManager.SpawnerTexture;
            deadTexture = ImageManager.CorpseTexture;

            //PrimaryWeapon
            PrimaryWeapon = new Laser(gamePlayScreen, this){LaserColour = Color.SpringGreen, LaserThickness = 6};
            range = 350.0f;
            visibleRange = 400.0f;
            isArmed = true;

            //Movement and status
            destination = Center;
            isCurrentlyMoveable = false;
            isInMotion = false;
            MaxSpeed = 0f;
            Speed = MaxSpeed;
            _lastSpawnCounter = 0f;
            _minSpawnTime = 30.0f;
            _waitTime = 30;
            _waveCount = 0;
            _maxWave = 2;

            //Hit points
            maxHP = 1500;
            startingHP = maxHP;
            currentHP = maxHP;
            killScore = 100;

            //Initialize the draw area as a proportion of the screen size
            width = (int)(gamePlayScreen.VP.Width * 0.3f);
            height = (int)(gamePlayScreen.VP.Height * 0.35f);

            base.Initialize();
        }