示例#1
0
 public Asteroid(Vector2 pos, int size, float speed, Vector2 direction, ContentManager content)
 {
     this.pos = pos;
     this.size = size;
     this.speed = speed;
     this.direction = direction;
     this.GetHit = false;
     this.ReadyToKill = false;
     SmallAst = content.Load<Texture2D>("AsteroidSmall");
     MedAst = content.Load<Texture2D>("AsteroidMedium");
     LargeAst = content.Load<Texture2D>("AsteroidLarge");
     SmallAstExp = new SpritesheetLoader("SAExplosion", false, 3, content);
     MedAstExp = new SpritesheetLoader("MAExplosion", false, 3, content);
     LargeAstExp = new SpritesheetLoader("LAExplosion", false, 3, content);
 }
示例#2
0
 public void Load(ContentManager content)
 {
     playerTextureMoving = content.Load<Texture2D>("RocketFlying");
     defaultTexture = content.Load<Texture2D>("RocketIdle");
     playerTextureIdle = defaultTexture;
     bulletTexture = content.Load<Texture2D>("RocketBulllet");
     origin.X = playerTextureIdle.Width / 2;
     origin.Y = playerTextureIdle.Height / 2;
     rocketExplodeSprite = new SpritesheetLoader("RocketExplosion", false, 8, content);
     bulletDirection = new Vector2((float)Math.Cos(rotationAngle), (float)Math.Sin(rotationAngle));
 }