LoadImage() public method

public LoadImage ( string url, bool createMask ) : ImageElement
url string
createMask bool
return System.Html.ImageElement
示例#1
0
        public override void Init(Scene level)
        {
            _level = (ShooterLevel)level;

            _images = new List<ImageElement>();
            for (int i = 1; i < 6; i++)
                _images.Add(level.LoadImage("images/shooter/buildings/" + i + ".png", true));
        }
示例#2
0
        protected override List<AnimationSequence> EnsureSequences(Scene scene)
        {
            List<AnimationSequence> sequences = new List<AnimationSequence>();
            AnimationSequence sequence = new AnimationSequence();
            ImageElement image = scene.LoadImage("Images/Race/obstacles/pole.png", false);
            sequence.AddSprite(image, 10, 80);
            sequences.Add(sequence);

            return sequences;
        }
示例#3
0
        protected override List<AnimationSequence> EnsureSequences(Scene scene)
        {
            List<AnimationSequence> sequences = new List<AnimationSequence>();
            AnimationSequence sequence = new AnimationSequence();
            ImageElement image = scene.LoadImage("Images/Race/obstacles/r1.png", false);
            sequence.AddSprite(image, 47, 78);
            sequences.Add(sequence);

            sequence = new AnimationSequence();
            image = scene.LoadImage("Images/Race/obstacles/r2.png", false);
            sequence.AddSprite(image, 47, 78);
            sequences.Add(sequence);

            sequence = new AnimationSequence();
            image = scene.LoadImage("Images/Race/obstacles/r3.png", false);
            sequence.AddSprite(image, 39, 77);
            sequences.Add(sequence);

            sequence = new AnimationSequence();
            image = scene.LoadImage("Images/Race/obstacles/r4.png", false);
            sequence.AddSprite(image, 50, 79);
            sequences.Add(sequence);

            sequence = new AnimationSequence();
            image = scene.LoadImage("Images/Race/obstacles/r5.png", false);
            sequence.AddSprite(image, 46, 74);
            sequences.Add(sequence);

            sequence = new AnimationSequence();
            image = scene.LoadImage("Images/Race/obstacles/r6.png", false);
            sequence.AddSprite(image, 47, 84);
            sequences.Add(sequence);

            return sequences;
        }
 public override void Init(Scene level)
 {
     if (_backgroundImage != null) return;
     _backgroundImage = level.LoadImage("images/bg.png", false);
 }