コード例 #1
0
ファイル: BEnemyship.cs プロジェクト: PssProgram/Lost-In-Trek
        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 BDefenseCannon(int amount, WeapType wt,WeapRanType wrt, ContactType ctype, float shootcd)
     : base(amount,wt,wrt ,ctype)
 {
     //数据设置
     width =5;
     height = 5;
     speed = 8f;
     Att = 2f;
     shootCd =new Countdown(shootcd);
 }
コード例 #3
0
 public BGeneralBomb(int amount, WeapType wt,WeapRanType wrt,ContactType ctype, float shootcd)
     : base(amount,wt,wrt,ctype)
 {
     //数据设置
     width =12;
     height = 12;
     speed =4.6f;
     startBomb = 0.1f;
     Att = 0.5f;
     shootCd = new Countdown(shootcd);
 }
コード例 #4
0
        public BDoubleMissile(int amount, WeapType wt,WeapRanType wrt,ContactType ctype, float shootcd)
            : base(amount,wt,wrt,ctype)
        {
            //数据设置
            width =8;
            height = 8;
            speed = 3.8f;
            Att = 5f;

            rots=0.08f;
            rotsInc = 0.0003f;
            speed =6f;

            shootCd = new Countdown(shootcd);
            //一次的发射数量
            OnceAmount = 2;
        }