예제 #1
0
        public FastRhomb(GeomCloneLevel level, Player evader, Vector2 position)
            : base(level, position, 0.7f, 500, 1000.0f, 720.0f, 0.007f,50)
        {
            Color c = Color.Pink;

            rotation = 0.0f;

            float r = 45.0f;
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2((float)8 / referenceWidth, (float)8 / referenceHeight), -r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(-(float)8 / referenceWidth, (float)8 / referenceHeight), r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(-(float)8 / referenceWidth, -(float)8 / referenceHeight), -r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2((float)8 / referenceWidth, -(float)8 / referenceHeight), r, 0.5f, 0.5f, c));

            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, Vector2.Zero, 0, 0.7071f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, Vector2.Zero, 90.0f, 0.7071f, 0.5f, c));

            Behavior.PursuitOn(evader.Vehicle);
            Behavior.SeparationOn();
            ChangeState(new FastRhombBorn(CurrentLevel, this));
        }
예제 #2
0
 public PlayerDead(GeomCloneLevel level, Player player)
     : base(level, player, null)
 {
     // Activate proper animation
     Owner.ChangeAnimation(new FadeOutDead(level, Owner));
 }
예제 #3
0
        public SmartRhomb(GeomCloneLevel currentLevel, Vector2 position, Player evader)
            : base(currentLevel, position, 0.1f, 400.0f, 150.0f, 720.0f, 0.007f, 100)
        {
            Color c = Color.LawnGreen;

            rotation = 0.0f;

            float r = 45.0f;
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2((float)8 / referenceWidth, (float)8 / referenceHeight), -r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(-(float)8 / referenceWidth, (float)8 / referenceHeight), r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(-(float)8 / referenceWidth, -(float)8 / referenceHeight), -r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2((float)8 / referenceWidth, -(float)8 / referenceHeight), r, 0.5f, 0.5f, c));

            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2((float)8 / referenceWidth, 0), 90.0f, 0.25f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(-(float)8 / referenceWidth, 0), 90.0f, 0.25f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(0, (float)8 / referenceHeight), 0, 0.25f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(0, -(float)8 / referenceHeight), 0, 0.25f, 0.5f, c));

            Behavior.PursuitOn(evader.Vehicle);
            Behavior.SeparationOn();
            Behavior.EvadeMultiOn(CurrentLevel.EntityManager.GetBulletsVehicles, 250);
            ChangeState(new BornState(CurrentLevel, this));
        }
예제 #4
0
        public static List<Enemy> SpawnRhombFlock(int size, GeomCloneLevel level, Player evader)
        {
            Vector2 position = new Vector2(RandomHelper.getRandomFloat(), RandomHelper.getRandomFloat());

            List<Enemy> list = new List<Enemy>(size);
            for (int ii = 0; ii < size; ii++)
            {
                Vector2 displacement = RandomHelper.getRandomVector() * 0.1f;
                list.Add(new Rhomb(level, evader, position + displacement));
            }

            return list;
        }
예제 #5
0
        public Rhomb(GeomCloneLevel setCurrentLevel, Player evader, Vector2 position)
            : base(setCurrentLevel, position, 0.1f, 300, 500.0f, 720.0f, 0.007f,50)
        {
            Color c = Color.Aqua;

            rotation = 0.0f;

            float r = 45.0f;
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2((float)8 / referenceWidth, (float)8 / referenceHeight), -r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(-(float)8 / referenceWidth, (float)8 / referenceHeight), r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2(-(float)8 / referenceWidth, -(float)8 / referenceHeight), -r, 0.5f, 0.5f, c));
            parts.Add(new ActorPart(Game, "smallRect", Position, rotation, new Vector2((float)8 / referenceWidth, -(float)8 / referenceHeight), r, 0.5f, 0.5f, c));

            Behavior.PursuitOn(evader.Vehicle);
            Behavior.SeparationOn();
            //ChangeState(new BornState(theGame, this));
            ChangeState(new RhombBorn(CurrentLevel, this));
        }