Пример #1
0
 protected override void Awake()
 {
     base.Awake();
     if (this == null)
     {
         return;
     }
     controller.Initialize(fadeImage);
     SetDissolveTexture(dissolveTexture);
 }
Пример #2
0
        protected override void LoadContent()
        {
            blockTexture2 = Game.Content.Load <Texture2D>("Textures/block_2");
            blockTexture  = Game.Content.Load <Texture2D>("Textures/block");
            gemTexture    = Game.Content.Load <Texture2D>("Textures/gem");

            shader = new ShaderController(Game.GraphicsDevice, this);
            shader.Initialize();

            sound       = Game.Content.Load <SoundEffect>("Sound/gem");
            spriteBatch = new SpriteBatch(GraphicsDevice);
            background.LoadContent(Game.Content);
            font = Game.Content.Load <SpriteFont>("Fonts/gameFont");

            healthTexture    = Game.Content.Load <Texture2D>("Textures/health");
            enemyRunTexture  = Game.Content.Load <Texture2D>("Enemy/run");
            enemyIdleTexture = Game.Content.Load <Texture2D>("Enemy/idle");
        }
 // Start is called before the first frame update
 void Start()
 {
     controller = GetComponent <ShaderController>();
     controller.Initialize(GetComponent <Image>());
 }