Esempio n. 1
0
 public void LoadContent()
 {
     LargeTarget.LoadContent(MyGame.Manager.ImageManager.TargetLargeRectangle);
     SmallTarget.LoadContent(MyGame.Manager.ImageManager.TargetSmallRectangle);
     KillEnemy.LoadContent(MyGame.Manager.ImageManager.EnemyRectangles);
     targetFast = false;
 }
Esempio n. 2
0
        public void Reset(LevelType levelType, Byte levelNo)
        {
            Byte ratio         = (Byte)(levelNo / 2.0f);
            Byte largeTargetPB = Constants.LARGE_TARGET_PB[(Byte)levelType];
            Byte smallTargetPB = Constants.SMALL_TARGET_PB[(Byte)levelType];

            LargeTarget.Reset(largeTargetPB + ratio);
            SmallTarget.Reset(smallTargetPB + ratio);

            //SmallTarget.SetPosition(smallPosition);
            //LargeTarget.SetPosition(largePosition);
        }
Esempio n. 3
0
        public void SetPosition(SpriteType type, Vector2 position)
        {
            switch (type)
            {
            case SpriteType.LargeTarget:
                LargeTarget.SetPosition(position);
                break;

            case SpriteType.SmallTarget:
                SmallTarget.SetPosition(position);
                break;
            }
        }
Esempio n. 4
0
        private void TheInit()
        {
            //Vector2 stPos = new Vector2(80, 360 + Constants.GameOffsetY);
            Rectangle stBounds = new Rectangle(30, 310 + Constants.GameOffsetY, 100, 100);

            SmallTarget = new SmallTarget();
            SmallTarget.Initialize(smallPosition, stBounds);

            const Byte targetTop  = 74;
            const Byte targetSize = 64;
            //Vector2 bgPos = new Vector2((Constants.ScreenWide - 64) / 2.0f, 250 + Constants.GameOffsetY);
            Rectangle bgBounds = new Rectangle(-2, targetTop + Constants.GameOffsetY, Constants.ScreenWide - targetSize + 2, Constants.ScreenHigh - (2 * Constants.GameOffsetY) - targetTop - targetSize + 2);

            LargeTarget = new LargeTarget();
            LargeTarget.Initialize(largePosition, Rectangle.Empty, bgBounds);
        }
Esempio n. 5
0
 public void Draw()
 {
     SmallTarget.Draw();
     LargeTarget.Draw();
 }
Esempio n. 6
0
 public void Update(GameTime gameTime)
 {
     LargeTarget.Update(gameTime, targetFast, targetHorz, targetVert);
     SmallTarget.Update(gameTime, targetHorz, targetVert);
 }
Esempio n. 7
0
 public void DrawCursor()
 {
     SmallTarget.Draw();
 }