示例#1
0
文件: Ship.cs 项目: DrMelon/intrepid
        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);
        }
示例#2
0
文件: Ship.cs 项目: DrMelon/intrepid
 public void ChangeShipController(ShipController newControls)
 {
     myShipController = newControls;
 }