示例#1
0
        public BEnemyship(Node node, Vector2 pos,List<BWeapon> weapons,Layer weaponLayer, string path)
            : base(node,pos,25,25, ContactType.Enemy,null,null,path)
        {
            this.weaponLayer =weaponLayer;

            //this.ToContact
            //this.beContact
            //随机AI间隔
            float rnd = Maths.Rnd.Next(1,5)*0.1f;
            aiticker = new Ticker(rnd);
            //随机锁敌半径
            lockRadius =Maths.Rnd.Next(500,900);
            //随机追踪间隔
            trackCd = new Countdown(Maths.Rnd.Next(10,50)*0.1f);

            this.Speed = 3.2f;
            inertiaSpeed = 1.83f;
            TrackAction = new BTracker (Body, ref  this.Speed, 0.025f, 0.0025f);
            lockRadius *= lockRadius;
            HP = 220;

            for(int i= 0;i < weapons.Count;i++)
            {
                weapons[i].ChangeMaster(this);
            }

            this.Weapon = new BWeaponSystem(this,weapons,weaponLayer);
        }
示例#2
0
 public MenuButton(Node node,string path,SelectTodo selectTodo,int num)
     : base(node)
 {
     Num = num;
     this.selectTodo = selectTodo;
     var vector = new Vector2(0,90 + Num * 60);
     Image = new SpriteX(this,path,vector,new Vector2i(1,2),new Vector2i(1,1));
     Image.Color.A = 0;
     ShowTime = new Ticker(0.65f + Num*0.12f);
 }
示例#3
0
 public void UnShow()
 {
     isEnd = true;
     ShowTime = new Ticker(0.65f);
 }
示例#4
0
 private void UnShowMenuButton()
 {
     ticker = new Ticker(0.7f);
     SelectButton = -1;
     CanBeControl = false;
     foreach(MenuButton mb in ButtonList)
         mb.UnShow();
 }
示例#5
0
        public void ShowMenu()
        {
            menuBG = new MenuBGObject(this);
            ButtonList = new List<MenuButton>();
            ticker = new Ticker(1.5f);
            Sce.Pss.HighLevel.GameEngine2D.Scheduler.Instance.Schedule(this, UpdateFrame, 0.0f, false);

            ShowMenuButton(MenuType.Planet);

            isMenuShow = true;
        }
示例#6
0
 public void Contiund()
 {
     for(int i = 0;i < ButtonList.Count;i++)
     {
         ButtonList[i].Remove();
     }
     ButtonList = new List<MenuButton>();
     ticker = new Ticker(1.5f);
     ShowMenuButton(ChangeMenu);
     ChangeMenu = MenuType.None;
     Sce.Pss.HighLevel.GameEngine2D.Scheduler.Instance.Schedule(this, UpdateFrame, 0.0f, false);
     isPause = false;
 }
示例#7
0
 public void UnShow()
 {
     ShowTime = new Ticker(0.5f - Num*0.08f);
     isEnd = true;
 }