Exemple #1
0
        //----------------------//------------------------//

        public Enemy(Texture2D texture) : base(texture)
        {
            _viewRangeTexture = new Texture2D(SceneManager.Instance.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
            _viewRangeTexture.SetData(new Color[] { Color.Green });
            _lastPosition      = Position;
            _enemyType         = EnemyType.None;
            _hasViewRange      = false;
            _viewRangeCooldown = 0f;
            _viewRangeOffset   = Vector2.Zero;
            _damage            = 0;
            _coins             = 3;
            CharacterSprite.SetImmunityMaxTime(0.35f);
        }