Esempio n. 1
0
 public BWingman(Node node, Vector2 pos, int number, float w, float h)
     : base(node, pos, w, h, ContactType.None, null, null, "Battles//testwingman.png")
 {
     master      = (BPlayer)node;
     this.number = number;
     Body.Scale  = new Vector2(0.5f, 0.5f);
 }
Esempio n. 2
0
 public BWingman(Node node,Vector2 pos,int number,float w,float h)
     : base(node,pos,w,h,ContactType.None,null,null,"Battles//testwingman.png")
 {
     master = (BPlayer)node;
     this.number =number;
     Body.Scale = new Vector2(0.5f,0.5f);
 }
Esempio n. 3
0
        public override void Start()
        {
            //先加载资源
            GameData.LoadTextureInfo("Battles//background.png");
            GameData.LoadTextureInfo("Battles//BoundaryWarning.png");
            GameData.LoadTextureInfo("Battles//primitive.png");
            GameData.LoadTextureInfo("Battles//star.png");
            GameData.LoadTextureInfo("Battles//test.png");
            GameData.LoadTextureInfo("Battles//testship.png");
            GameData.LoadTextureInfo("Battles//testwingman.png");

            bacgroundBack = new Layer();
            bacground     = new Layer();
            middle        = new Layer();
            front         = new Layer();

            this.AddChild(bacgroundBack);             //最下层
            this.AddChild(bacground);
            this.AddChild(middle);
            this.AddChild(front);

            LeftLimit  = -Width * 0.5f;
            RightLimit = Width * 0.5f;
            UpLimit    = -Heigth * 0.5f;
            DownLimit  = Heigth * 0.5f;

            map          = new BattleMap(bacgroundBack);
            enemy        = new BEnemyManager(middle, this);
            player       = new BPlayer(middle, this);
            otherSprites = new SpriteX(this, "Battles//test.png", new Vector2(0, 0));
            otherSprites.CenterSprite(TRS.Local.Center);

            //锁定
            player.SetCanLockEnemys(enemy.GetAllWarships());
            enemy.SetCanLockEnemys(player.GetAllWarships());

            base.Start();
        }
Esempio n. 4
0
        public override void Start()
        {
            //先加载资源
            GameData.LoadTextureInfo("Battles//background.png");
            GameData.LoadTextureInfo("Battles//BoundaryWarning.png");
            GameData.LoadTextureInfo("Battles//primitive.png");
            GameData.LoadTextureInfo("Battles//star.png");
            GameData.LoadTextureInfo("Battles//test.png");
            GameData.LoadTextureInfo("Battles//testship.png");
            GameData.LoadTextureInfo("Battles//testwingman.png");

            bacgroundBack = new Layer ();
            bacground = new Layer ();
            middle = new Layer ();
            front = new Layer ();

            this.AddChild (bacgroundBack);//最下层
            this.AddChild (bacground);
            this.AddChild (middle);
            this.AddChild (front);

            LeftLimit = - Width * 0.5f;
            RightLimit = Width * 0.5f;
            UpLimit = - Heigth * 0.5f;
            DownLimit = Heigth * 0.5f;

            map = new BattleMap(bacgroundBack);
            enemy = new BEnemyManager(middle,this);
            player = new BPlayer(middle,this);
            otherSprites = new SpriteX (this, "Battles//test.png", new Vector2 (0, 0));
            otherSprites.CenterSprite (TRS.Local.Center);

            //锁定
            player.SetCanLockEnemys(enemy.GetAllWarships());
            enemy.SetCanLockEnemys(player.GetAllWarships());

            base.Start ();
        }