示例#1
0
        private Sprite ZEICHENSPRITE; //SPRITE DAS ZUM DARSTELLEN GENUTZT WIRD

        #endregion Fields

        #region Constructors

        public c_Xcore(ref c_resource_management trmgm)
        {
            pRESOURCES = trmgm; //ZUWEISEN
            pRESOURCES.HWND = GameDefinition.hwnd;
            this.initialisiere_Game_Device();
            this.init_Klassen();
        }
示例#2
0
        private bool init_game()
        {
            ////////////////////////////////////////////////
            DirectoryInfo diThis = new DirectoryInfo(Application.StartupPath);
            string pfad = diThis.Parent.Parent.FullName + @"\";
            ////////////////////////////////////////////////

            ///////////////////////////////////////////////////////////////////////
            RESOURCES = new c_resource_management(pfad, this.Handle);//RESOURCE VERWALTUNG

            Hashtable config = RESOURCES.load_config("screen.ini");

            GameDefinition.width = (int)config["width"];
            GameDefinition.height = (int)config["height"];
            GameDefinition.window = (bool)config["fullscreen"];
            GameDefinition.hwnd = this.Handle;
            GameDefinition.music = true;
            GameDefinition.sounds = true;
            GameDefinition.isometric = true;

            ENGINE = new c_Xcore(ref RESOURCES);  //GAME ENGINE

            SCreen.Width = (int)config["width"];
            SCreen.Height = (int)config["height"];

            RESOURCES.LoadTexture(0, 0, "b1.PNG",ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(0, 1, "b2.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(0, 2, "b3.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(0, 3, "b4.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(0, 4, "b5.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(0, 5, "b6.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(0, 6, "b7.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(0, 7, "b8.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(2, 1, @"detailtexturen\d1.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(2, 2, @"detailtexturen\wall1.png", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(3, 1, @"detailtexturen\wiking.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(1, 1, "cross.bmp", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(1, 2, "cross2.bmp", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(1, 3, "energy.PNG", ref ENGINE.DEVICE);
            RESOURCES.LoadTexture(1, 4, "energy2.PNG", ref ENGINE.DEVICE);

            RESOURCES.load_music(0, "soulfly1.mp3");
            RESOURCES.load_sound(0, "shot.wav");
            RESOURCES.load_sound(1, "punch1.wav");
            RESOURCES.load_sound(2, "close2.wav");
            RESOURCES.load_sound(3, "earth02.wav");

            ///////////////////////////////////////////////////////////////////////
            RESOURCES.load_map("map1.txt");
            RESOURCES.load_detailmap("map2.txt");

            BACK = new XSprite(ref ENGINE.DEVICE);
            BatchSprite = new Sprite(ENGINE.DEVICE);

            ///////////////////////GUI////////////////////////
            this.init_gui();
            //////////////////////////////////////////////////

            this.init_CHARAKTER();

            EXPLOSIONS = new List<c_explosion>();
            EXPLOSIONS.Add(new c_explosion(ref ENGINE.DEVICE, ref RESOURCES.TEXTURE[1, 1], 1000));

            ENGINE.AUDIO.play_music(0);

            return true;
        }
示例#3
0
 public c_audio(ref c_resource_management tmpmgm)
 {
     pRESOURCES = tmpmgm;
     pDEVICE = pRESOURCES.SOUNDDEVICE;
 }