示例#1
0
 public LobbyObject(CPlayer _player)
 {
     m_cPlayerObject = _player;
     m_cWeapon = _player.BaseWeapon;
     m_nShipWeaponIndex = 0;
     m_nShipTexture = TextureManager.Instance.LoadTexture("textures/shipselect");
     m_nWeaponTexture = TextureManager.Instance.LoadTexture("textures/weaponselect");
 }
示例#2
0
        /// <summary>
        /// CreatePlayer
        /// Creates a generic player and sets the attributes they share
        /// </summary>
        /// <returns></returns>
        public static CPlayer CreatePlayer()
        {
            CPlayer player = new CPlayer();

            float startPos = SaveInfo.Instance.ScreenResolution.Y - 128;
            player.UpdateData.objectType = Threading.UpdateData.ObjectType.PLAYER;
            player.UpdateData.position = new Vector2(startPos);
            player.RenderData.drawRectangle = new Rectangle(0, 0, 64, 64);
            player.RenderData.position = new Vector2(startPos);
            player.RenderData.center = new Vector2(32);
            return player;
        }
示例#3
0
        public CPlayer()
        {
            m_cBaseWeapon = new CBaseWeapon(this);
            m_cSecondaryPlayer = null;
            m_dNumLives = 3;
            m_dScore = 0;
            m_dMovementSpeed = 200.0;
            m_dCombineSpeed = 150.0;
            m_cKeyboardBindings = new KeyBindings();
            m_cGamepadBindings = new ButtonBindings();
            m_bPrimaryPlayer = false;

            // Object Factory will take care of the following
            // - playerIndex

            EventManager.Instance.RegisterEvent(EVENT_ID.PLAYER_COMBINE, this);
        }
示例#4
0
 public void SetSecondaryPlayer(CPlayer _player = null, bool primary = false)
 {
     m_cSecondaryPlayer = _player;
     m_bPrimaryPlayer = primary;
 }