Esempio n. 1
0
        public void Initialize(GameServiceContainer gameServices, ContentManager content, PropertyMap propMap, Vector2 position)
        {
            Health = propMap.GetInt("Health");
            Tag    = propMap["Tag"];

            _spriteSheet = content.Load <Texture2D>(SPRITE_SHEET_PATH);

            Sprite = new Sprite(0, 0, SPRITE_SIZE, SPRITE_SIZE, _spriteSheet);

            Position = position;

            IPhysicsManager physicsManager = gameServices.GetService <IPhysicsManager>();

            this.Collider = physicsManager.CreateRectCollider(this, new Vector2(ROCK_SIZE), false);

            _debugTexture = content.Load <Texture2D>(DEBUG_TEXTURE_PATH);
        }