コード例 #1
0
        public Enemy(Vector2 _position, float _rotation, Vector2 _scale, Vector2 _size, Vector2 _enemySpeed, string _texture, int _maxLife, float _angle, float _lifetime, int _damage, float _colliderRadius) : base(_position, _scale, _size, _rotation, _texture, _damage, _colliderRadius, _enemySpeed)/*(position, rotation, scale, size, enemySpeed, texture, life)*/
        {
            Speed         = _enemySpeed;
            shootMaxTimer = 1.5f;

            bulletsPool = new ObjectsPool <EnemyBullet>();

            LifeController = new LifeController(this, true, false, _maxLife, _lifetime);
        }
コード例 #2
0
        //

        public Player(Vector2 _position, Vector2 _scale, float _rotation, Vector2 _size, Vector2 _speed, int _maxLife, string _texture, int _damage, float _radius) : base(_position, _scale, _size, _rotation, _texture, _damage, _radius, _speed)
        {
            canRespawn       = true;
            canReceiveDamage = true;
            inmunity         = false;
            canShoot         = true;

            Speed       = _speed;
            bulletsPool = new ObjectsPool <PlayerBullet>();

            LifeController = new LifeController(this, false, true, _maxLife);//TODO Sacar _maxLife del constructor, correspondería ponerlo en el lifeController.
        }