예제 #1
0
 /*
  * temp:one_bomb two_bomb three_bomb save_bomb paper_plane thunder_bomb
  *       常规炮     双炮    散炮         疗伤炮   纸飞机       轰天雷
  */
 public void PlaySkill(SkillManager.SkillType temp, CharacterLogic A, AttackBaseData AA)
 {
     if (OnSkillPlay != null)
     {
         OnSkillPlay(temp, A, AA);
     }
 }
예제 #2
0
 public void Throw_thunder_bomb(CharacterLogic A, AttackBaseData AA)
 {
     while (--thunder_bomb_num != 0)
     {
         GameGOW.Get().BombMgr.ThrowBomb(A, AA as AttackBombData, false);
     }
 }
예제 #3
0
        public void Throw_Bomb(SkillType x, CharacterLogic A, AttackBaseData AA)
        {
            Init_Round();
            set_animation((int)x);
            if (A.go_down == true)
            {
                return;
            }
            thunder_bomb_num = 0;
            kill_bomb        = 1.0f;
            DO_bomb_Action   = true;
            bomb_num         = 1;

            switch (x)
            {
            case SkillType.Normal:
                Throw_one_Bomb(A, AA);
                break;

            case SkillType.Cure:
                DO_bomb_Action = false;
                Throw_cure_bomb(A, AA);
                break;

            case SkillType.DoubleBomb:
                bomb_num = 2;
                Throw_two_Bomb(A, AA);
                break;

            case SkillType.TripleBomb:
                bomb_num = 3;
                Throw_three_Bomb(A, AA);
                break;

            case SkillType.Teleport:
                DO_bomb_Action = false;
                Throw_one_Bomb(A, AA);
                break;

            case SkillType.Robot:
                break;

            case SkillType.ThunderBomb:
                thunder_bomb_num = 6;
                bomb_num         = 5;
                Throw_thunder_bomb(A, AA);
                break;

            case SkillType.Rocket:
                Rock_Bomb();
                Throw_one_Bomb(A, AA);
                break;
            }
        }
예제 #4
0
        public static AttackBaseData CreateInstance(CharacterAttackType eType)
        {
            switch (eType)
            {
            case CharacterAttackType.BOMB:
                return(AttackBaseData.CreateInstance <AttackBombData>());

            case CharacterAttackType.NORMAL:
                return(AttackBaseData.CreateInstance <AttackNormalData>());
            }
            return(null);
        }
예제 #5
0
        public void Throw_three_Bomb(CharacterLogic A, AttackBaseData AA)
        {
            int temp = GameGOW.Get().BattleMgr.m_pCurrentPlayer.m_pInfo.m_iBombSpeed;

            GameGOW.Get().BattleMgr.m_pCurrentPlayer.m_pInfo.m_iBombSpeed -= 100;
            GameGOW.Get().BattleMgr.m_pCurrentPlayer.m_pInfo.m_iCurrentAngle -= 3;
            GameGOW.Get().BombMgr.ThrowBomb(A, AA as AttackBombData, false);

            GameGOW.Get().BattleMgr.m_pCurrentPlayer.m_pInfo.m_iBombSpeed += 100;
            GameGOW.Get().BattleMgr.m_pCurrentPlayer.m_pInfo.m_iCurrentAngle += 3;
            GameGOW.Get().BombMgr.ThrowBomb(A, AA as AttackBombData, true);

            GameGOW.Get().BattleMgr.m_pCurrentPlayer.m_pInfo.m_iBombSpeed += 100;
            GameGOW.Get().BattleMgr.m_pCurrentPlayer.m_pInfo.m_iCurrentAngle += 6;
            GameGOW.Get().BombMgr.ThrowBomb(A, AA as AttackBombData, false);
        }
예제 #6
0
 public void FromPrefabs(CharacterEditorData.CharacterEditorStateData editStateDt)
 {
     this.animation_name = editStateDt.m_animationName;
     this.total_frame    = editStateDt.m_totFrame;
     foreach (CharacterEditorData.CharacterEditorBombAttackData item in editStateDt.m_attackBmDatas)
     {
         int            frame = item.m_iFrame;
         AttackBombData pData = (AttackBombData)AttackBaseData.CreateInstance(item.m_attackType);
         pData.damage         = item.m_damage;
         pData.center_damage  = item.m_centerDamage;
         pData.bomb_config_id = item.m_bombCofigID;
         AttackData[frame]    = pData;
     }
     foreach (CharacterEditorData.CharacterEditorNormalAttackData item in editStateDt.m_attackNmDatas)
     {
         int frame = item.m_iFrame;
         AttackNormalData pData = (AttackNormalData)AttackBaseData.CreateInstance(item.m_attackType);
         AttackData[frame] = pData;
     }
 }
예제 #7
0
        private void CheckIsAttack()
        {
            if (Network.gamemode == BattleType.AI_1v1)
            {
                if (m_pInfo.m_pCurrentStateData.AttackData.ContainsKey(m_pInfo.m_iCurrentFrame))
                {
                    AttackBaseData attack = m_pInfo.m_pCurrentStateData.AttackData[m_pInfo.m_iCurrentFrame];
                    if (attack.Type == CharacterAttackType.BOMB && this.IsLiving == true)
                    {
                        AA = attack;

                        //SkillManager.CurrentSkillId = (int)SkillManager.SkillType.Normal;
                        //GameGOW.Get().PlaySkill(SkillManager.SkillType.Normal, this, attack)
                        GameGOW.Get().PlaySkill((SkillManager.SkillType)SkillManager.CurrentSkillId, this, attack);

                        // GameGOW.Get().BombMgr.ThrowBomb(this, attack as AttackBombData);
                    }
                }
            }
            if (Network.NetworkMode == true)
            {
            }
            else
            {
                if (m_pInfo.m_pCurrentStateData.AttackData.ContainsKey(m_pInfo.m_iCurrentFrame))
                {
                    AttackBaseData attack = m_pInfo.m_pCurrentStateData.AttackData[m_pInfo.m_iCurrentFrame];
                    if (attack.Type == CharacterAttackType.BOMB && this.IsLiving == true)
                    {
                        AA = attack;

                        //SkillManager.CurrentSkillId = (int)SkillManager.SkillType.Normal;
                        //GameGOW.Get().PlaySkill(SkillManager.SkillType.Normal, this, attack)
                        GameGOW.Get().PlaySkill((SkillManager.SkillType)SkillManager.CurrentSkillId, this, attack);

                        // GameGOW.Get().BombMgr.ThrowBomb(this, attack as AttackBombData);
                    }
                }
            }
        }
예제 #8
0
        public override void FromXml(XmlElement xml)
        {
            XmlRead.Attr(xml, "animation_name", ref animation_name);
            XmlRead.Attr(xml, "total_frame", ref total_frame);

            XmlNodeList xmlList = xml.GetElementsByTagName("attack");
            int         frame   = -1;

            foreach (XmlNode node in xmlList)
            {
                XmlElement          ele   = node as XmlElement;
                CharacterAttackType eType = CharacterAttackType.NONE;

                XmlRead.AttrEnum <CharacterAttackType>(ele, "attack_type", ref eType);
                XmlRead.Attr(ele, "frame_index", ref frame);

                AttackBaseData pData = AttackBaseData.CreateInstance(eType);
                pData.FromXml(ele);
                AttackData[frame]      = pData;
                Network.attackbasedata = pData;
            }
        }
예제 #9
0
        IEnumerator DelayBomb(CharacterLogic A, AttackBaseData attack, float delay_time)         //延迟发炮,delay_time 为延迟时间
        {
            yield return(new WaitForSeconds(delay_time));

            GameGOW.Get().BombMgr.ThrowBomb(A, attack as AttackBombData, false);
        }
예제 #10
0
 public void Throw_two_Bomb(CharacterLogic A, AttackBaseData AA)
 {
     GameGOW.Get().BombMgr.ThrowBomb(A, AA as AttackBombData, true);
     StartCoroutine(DelayBomb(A, AA, 0.2f));
 }
예제 #11
0
 public void Throw_one_Bomb(CharacterLogic A, AttackBaseData AA)
 {
     GameGOW.Get().BombMgr.ThrowBomb(A, AA as AttackBombData, true);
 }
예제 #12
0
 public void Throw_cure_bomb(CharacterLogic A, AttackBaseData AA)
 {
     kill_bomb = -1.0f;
     Throw_one_Bomb(A, AA);
 }