public Alien(PrisonGame game)
        {
            this.game = game;
            spit = new Spit(this.game);
            model = new AnimatedModel(game, "Alien");
            model.AddAssetClip("catcheat", "Alien-catcheat");
            model.AddAssetClip("stance", "Alien-stance");
            model.AddAssetClip("tantrum", "Alien-trantrum");
            model.AddAssetClip("ob", "Alien-ob");

            SetAlienTransform();
        }
Beispiel #2
0
 public void RemoveSpit(Spit spit)
 {
     shootingSpits.Remove(spit);
 }
Beispiel #3
0
 public void ShootSpit(Spit spit)
 {
     shootingSpits.Add(spit);
 }
Beispiel #4
0
        public void SpitAtVictoria()
        {
            Spit dalekSpit = new Spit(game);

            Vector3 playerLoc = player.Location;
            Vector3 myLoc = position;
            Vector3 pointAtPlayerFromMyFront = (myLoc - playerLoc);
            pointAtPlayerFromMyFront.Normalize();
            float frontToPlayer = (float)Math.Atan2(pointAtPlayerFromMyFront.X, pointAtPlayerFromMyFront.Z);

            dalekSpit.MyTransform = Matrix.CreateRotationY((float)Math.PI+frontToPlayer) * Matrix.CreateTranslation(position + new Vector3(0, 120, 0));

            dalekSpit.DirectionShooting = dalekSpit.MyTransform.Backward;
            game.ShootSpit(dalekSpit);
        }