示例#1
0
        //---------------------------------------------------------------------
        public BulletCollider newBulletCollider(float center_x, float center_y, float width, float height)
        {
            BulletCollider collider = new BulletCollider(center_x, center_y, width, height);

            mTagColliderList.Add(collider);
            return(collider);
        }
示例#2
0
 //---------------------------------------------------------------------
 public void destroy()
 {
     if (mDestroy) return;
     mDestroy = true;
     if (mBulletCollider != null)
     {
         mBulletCollider.onCollision -= onCollision;
         mScene.getColliderMgr().removeCollider(mBulletCollider);
         mBulletCollider = null;
     }
 }
示例#3
0
 //---------------------------------------------------------------------
 public void destroy()
 {
     if (mDestroy)
     {
         return;
     }
     mDestroy = true;
     if (mBulletCollider != null)
     {
         mBulletCollider.onCollision -= onCollision;
         mScene.getColliderMgr().removeCollider(mBulletCollider);
         mBulletCollider = null;
     }
 }
示例#4
0
        //---------------------------------------------------------------------
        public void create(uint et_player_rpcid, int bullet_objid, int turret_rate, int bullet_vibid,
            EbVector3 turret_pos, float turret_angle, float bullet_speed)
        {
            mPlayerId = et_player_rpcid;
            mBulletObjId = bullet_objid;
            mPos = turret_pos;
            mfAngle = turret_angle;
            miTurretRate = turret_rate;
            mfBulletSpeed = bullet_speed;

            CLogicTurret turret = mScene.getTurret(mPlayerId);
            if (turret == null || !turret.isBot()) return;

            mBulletCollider = mScene.getColliderMgr().newBulletCollider(0, 0, 41, 47);// 读取vib配置
            mBulletCollider.onCollision += onCollision;
            mBulletCollider.setDirection(mfAngle);
            update(0);
        }
示例#5
0
        //---------------------------------------------------------------------
        public void create(uint et_player_rpcid, int bullet_objid, int turret_rate, int bullet_vibid,
                           EbVector3 turret_pos, float turret_angle, float bullet_speed)
        {
            mPlayerId     = et_player_rpcid;
            mBulletObjId  = bullet_objid;
            mPos          = turret_pos;
            mfAngle       = turret_angle;
            miTurretRate  = turret_rate;
            mfBulletSpeed = bullet_speed;

            CLogicTurret turret = mScene.getTurret(mPlayerId);

            if (turret == null || !turret.isBot())
            {
                return;
            }

            mBulletCollider              = mScene.getColliderMgr().newBulletCollider(0, 0, 41, 47);// 读取vib配置
            mBulletCollider.onCollision += onCollision;
            mBulletCollider.setDirection(mfAngle);
            update(0);
        }
示例#6
0
 //---------------------------------------------------------------------
 public BulletCollider newBulletCollider(float center_x, float center_y, float width, float height)
 {
     BulletCollider collider = new BulletCollider(center_x, center_y, width, height);
     mTagColliderList.Add(collider);
     return collider;
 }