Exemple #1
0
        public Ship()
        {
            // Create Graphics
            myShipSprite = new Spritemap<string>(Assets.SHIP_GFX_TEST, 33, 33);
            myShipSprite.Add("ship", new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, new float[] { 2f });
            myShipSprite.Play("ship");
            myShipSprite.CurrentFrame = 0;

            myFlameSprite = new Spritemap<string>(Assets.SHIP_GFX_TEST_FLAME, 33, 33);
            myFlameSprite.Add("ship", new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, new float[] { 2f });
            myFlameSprite.Play("ship");
            myFlameSprite.CurrentFrame = 0;
            myFlameSprite.CenterOrigin();

            Graphic = myShipSprite;
            Graphics.Add(myFlameSprite);
            Graphic.CenterOrigin();

            // Create Components
            myMovement = new ShipMovement(128 * 20, 128 * 20, EnginePower);
            myShipController = new ShipController(this);
            AddComponent(myMovement);
        }
Exemple #2
0
 public void ChangeShipController(ShipController newControls)
 {
     myShipController = newControls;
 }