
using System;

namespace PlanetExpress.items.enemys.masters {
	
	enum BossVector {up, down}		
		
	public class BossEnemyMaster : BaseEnemyMaster {
		
		public BossEnemyMaster(EnemyClass enemy) : base(enemy) {
		}
				
		BossVector vector = BossVector.up;
		public override void Action (double timer) {
			if (Enemy.X + Enemy.BaseSize * Enemy.SizeScale > GameApp.ScreenWidth) {
				Enemy.X -= 30f * (float)timer;	
			}
			switch (vector) {
			case BossVector.up:
				Enemy.Y -= 160f * (float)timer;
				if (Enemy.Y - Enemy.BaseSize < 0) 
					vector = BossVector.down;
				break;
			case BossVector.down:
				Enemy.Y += 160f * (float)timer;	
				if (Enemy.BaseSize + Enemy.Y > GameApp.ScreenHeight) 
					vector = BossVector.up;
				
				break;
			}
			Enemy.Shoot();
			Enemy.Shoot2();
		}
		
		public override void Die () {
			MissionScreenClass.Area.BossDie();
		}
	}
}
