Esempio n. 1
0
 protected void InitParam(BulletData.BulletHoming _data)
 {
     homingLimit       = _data.limitAngel;
     homingChangeStart = _data.limitChangeStartTime;
     homingChange      = _data.limitChangeAngel;
     hightLock         = _data.hightLock;
     acceleration      = _data.acceleration;
 }
Esempio n. 2
0
 private void CreateEndBullet()
 {
     //IL_0070: Unknown result type (might be due to invalid IL or missing references)
     if (MonoBehaviourSingleton <StageObjectManager> .IsValid())
     {
         if (string.IsNullOrEmpty(endBullet.get_name()))
         {
             Log.Error("endBullet.name is empty, so can't create EndBullet!!");
         }
         else if (endBullet.type == BulletData.BULLET_TYPE.ICE_FLOOR)
         {
             Enemy enemy = stageObject as Enemy;
             if (!(enemy == null))
             {
                 List <Vector3>    list    = new List <Vector3>(1);
                 List <Quaternion> rotList = new List <Quaternion>();
                 list.Add(_transform.get_position());
                 enemy.ActCreateIceFloor(endBullet, list, rotList);
             }
         }
         else
         {
             AttackInfo endBulletAttackInfo = GetEndBulletAttackInfo();
             if (endBulletAttackInfo == null)
             {
                 Log.Error("AttackInfo is null!!");
             }
             else
             {
                 Transform transform = MonoBehaviourSingleton <StageObjectManager> .I._transform;
                 if (transform == null)
                 {
                     Log.Error("parentTrans is null, so can't create EndBullet!!");
                 }
                 else if (type == BulletData.BULLET_TYPE.HIGH_EXPLOSIVE)
                 {
                     HighExplosiveSettings(endBulletAttackInfo, transform);
                 }
                 else
                 {
                     BulletObject            bulletObject = ShotEndBullet(endBulletAttackInfo, transform);
                     BulletData.BulletHoming dataHoming   = endBullet.dataHoming;
                     if (dataHoming != null && dataHoming.isTakeOverTarget && m_targetObject != null)
                     {
                         bulletObject.SetTarget(m_targetObject);
                     }
                     if (type == BulletData.BULLET_TYPE.BREAKABLE && bulletData.dataBreakable != null)
                     {
                         if (bulletData.dataBreakable.isTakeOverTarget && m_targetObject != null)
                         {
                             bulletObject.SetTarget(m_targetObject);
                         }
                         if (bulletData.dataBreakable.isTakeOverHitCount)
                         {
                             BulletControllerBreakable bulletControllerBreakable  = controller as BulletControllerBreakable;
                             BulletControllerBreakable bulletControllerBreakable2 = bulletObject.controller as BulletControllerBreakable;
                             if (bulletControllerBreakable != null && bulletControllerBreakable2 != null)
                             {
                                 bulletControllerBreakable2.SetHitCount(bulletControllerBreakable.GetHitCount());
                             }
                         }
                     }
                 }
             }
         }
     }
 }