Exemplo n.º 1
0
        public MainCharacter(Map map) : base("Resources/Characters/MainCharacter.png", 32, 48)
        {
            teleportClock = new Clock();

            CatSound     = new Sound(new SoundBuffer("Resources/Sounds/Meow.wav"));
            PickupSound  = new Sound(new SoundBuffer("Resources/Sounds/Pickup_Coin.wav"));
            HealSound    = new Sound(new SoundBuffer("Resources/Sounds/Healing.wav"));
            DoorSound    = new Sound(new SoundBuffer("Resources/Sounds/door.wav"));
            WarlockSound = new Sound(new SoundBuffer("Resources/Sounds/warlock.wav"));
            AnimDown     = new Animation(0, 0, 4);
            AnimRight    = new Animation(96, 0, 4);
            AnimLeft     = new Animation(48, 0, 4);
            AnimUp       = new Animation(144, 0, 4);

            Xpos = 449;
            Ypos = 1546;

            moveSpeed      = 150f;
            animationSpeed = 0.1f;

            this.map = map;

            teleport     = new Teleport();
            ItemsAndNpcs = new ItemsAndNpcs();

            messageBox  = new MessageBox();
            messageText = new MessageText();
        }
Exemplo n.º 2
0
        public OpenWorldScene(GameObject gameObject) : base(gameObject)
        {
            ViewPortX = 640;
            ViewPortY = 480;

            music = new Music(@"Resources\Sounds\Morning_Stroll.wav");

            view                 = new View(new Vector2f(0, 0), new Vector2f(ViewPortX, ViewPortY));
            _map                 = new Map(this);
            myCharacter          = new MainCharacter(_map);
            cat                  = new Cat(_map);
            bat                  = new Bat(_map);
            mage                 = new Mage(_map);
            finalBoss            = new FinalBoss(_map);
            enemyKilledWithSword = new EnemyKilledWithSword(_map);
            ItemsAndNpcs         = new ItemsAndNpcs();
            messageBox           = new MessageBox();
            messageText          = new MessageText();
            this.gameObject      = gameObject;
        }