コード例 #1
0
ファイル: Player.cs プロジェクト: uvbs/DDTank-3.0
        public override void Reset()
        {
            m_maxBlood = (int)((950 + m_player.PlayerCharacter.Grade * 50 + LevelPlusBlood + m_player.PlayerCharacter.Defence / 10) * m_player.GetBaseBlood());
            if (m_game.RoomType == eRoomType.Treasure || m_game.RoomType == eRoomType.Boss)
            {
                m_game.Cards = new int[21];
            }
            else
            {
                m_game.Cards = new int[8];
            }

            Dander         = 0;
            m_energy       = (m_player.PlayerCharacter.Agility / 30 + 240);
            IsLiving       = true;
            FinishTakeCard = false;
            m_weapon       = m_player.MainWeapon;
            //m_mainBallId = m_weapon.Property1;
            //m_spBallId = m_weapon.Property2;
            var ballConfig = BallConfigMgr.FindBall(m_weapon.TemplateID);

            m_mainBallId = ballConfig.Common;
            m_spBallId   = ballConfig.Special;
            BaseDamage   = m_player.GetBaseAttack();
            BaseGuard    = m_player.GetBaseDefence();

            Attack  = m_player.PlayerCharacter.Attack;
            Defence = m_player.PlayerCharacter.Defence;
            Agility = m_player.PlayerCharacter.Agility;
            Lucky   = m_player.PlayerCharacter.Luck;

            m_currentBall = BallMgr.FindBall(m_mainBallId);
            m_shootCount  = 1;
            m_ballCount   = 1;

            CurrentIsHitTarget = false;

            TotalCure           = 0;
            TotalHitTargetCount = 0;
            TotalHurt           = 0;
            TotalKill           = 0;
            TotalShootCount     = 0;
            LockDirection       = false;
            GainGP    = 0;
            GainOffer = 0;
            Ready     = false;
            PlayerDetail.ClearTempBag();

            LoadingProcess = 0;

            base.Reset();
        }
コード例 #2
0
ファイル: Player.cs プロジェクト: geniushuai/DDTank-3.0
        public Player(IGamePlayer player, int id, BaseGame game, int team)
            : base(id, game, team, "", "", 1000, 0, 1)                   //TODO   lastPatemer    direction
        {
            m_rect = new Rectangle(-15, -20, 30, 30);
            m_player = player;
            m_player.GamePlayerId = id;
            m_isActive = true;
            m_canGetProp = true;
            Grade = player.PlayerCharacter.Grade;

            TotalAllHurt = 0;
            TotalAllHitTargetCount = 0;
            TotalAllShootCount = 0;
            TotalAllKill = 0;
            TotalAllExperience = 0;
            TotalAllScore = 0;
            TotalAllCure = 0;
            m_weapon = m_player.MainWeapon;
            if (m_weapon != null)
            {
                var ballConfig = BallConfigMgr.FindBall(m_weapon.TemplateID);
                m_mainBallId = ballConfig.Common;
                m_spBallId = ballConfig.Special;
                //m_mainBallId = m_weapon.Property1;
                //m_spBallId = m_weapon.Property2;
            }
            m_loadingProcess = 0;

            InitBuffer(m_player.EquipEffect);
            m_energy = (m_player.PlayerCharacter.Agility / 30 + 240);
            m_maxBlood = (int)((950 + m_player.PlayerCharacter.Grade * 50 + LevelPlusBlood + m_player.PlayerCharacter.Defence / 10) * m_player.GetBaseBlood());
        }
コード例 #3
0
ファイル: Player.cs プロジェクト: uvbs/DDTank-3.0
        public Player(IGamePlayer player, int id, BaseGame game, int team)
            : base(id, game, team, "", "", 1000, 0, 1)                   //TODO   lastPatemer    direction
        {
            m_rect   = new Rectangle(-15, -20, 30, 30);
            m_player = player;
            m_player.GamePlayerId = id;
            m_isActive            = true;
            m_canGetProp          = true;
            Grade = player.PlayerCharacter.Grade;

            TotalAllHurt           = 0;
            TotalAllHitTargetCount = 0;
            TotalAllShootCount     = 0;
            TotalAllKill           = 0;
            TotalAllExperience     = 0;
            TotalAllScore          = 0;
            TotalAllCure           = 0;
            m_weapon = m_player.MainWeapon;
            if (m_weapon != null)
            {
                var ballConfig = BallConfigMgr.FindBall(m_weapon.TemplateID);
                m_mainBallId = ballConfig.Common;
                m_spBallId   = ballConfig.Special;
                //m_mainBallId = m_weapon.Property1;
                //m_spBallId = m_weapon.Property2;
            }
            m_loadingProcess = 0;

            InitBuffer(m_player.EquipEffect);
            m_energy   = (m_player.PlayerCharacter.Agility / 30 + 240);
            m_maxBlood = (int)((950 + m_player.PlayerCharacter.Grade * 50 + LevelPlusBlood + m_player.PlayerCharacter.Defence / 10) * m_player.GetBaseBlood());
        }