Esempio n. 1
0
        protected override void Initialize()
        {
            // Sample texture, 1x1 pixel for testing.
            simpleTexture = new Texture2D(GraphicsDevice, 1, 1);
            simpleTexture.SetData(new[] { Color.White });

            // Initializes the accelerometer.
            initializeAccelerometer();

            // Databases
            tileDatabase = new TileDatabase();
            roomDatabase = new RoomDatabase();

            // Handlers
            songHandler      = new SongHandler();
            inventoryHandler = new InventoryHandler();
            eventHandler     = new EventHandler();
            locationHandler  = new LocationHandler();

            // Objects
            mapDefinition   = new Map();
            sadakoReference = new Sadako();
            playerReference = new Player();

            // M! game profiler for FPS and other related stuff
#if DEBUG
            Components.Add(new GameProfiler(this, Content));
#endif

            base.Initialize();
        }
Esempio n. 2
0
 public void Initialize(ContentManager Content, Vector2 sadakoStartingPosition, SongHandler songHandler, Player playerReference, LocationHandler locationHandler)
 {
     Texture2D sadakoTexture = Content.Load<Texture2D>("image");
     Texture2D grabTexture = Content.Load<Texture2D>("waifu");
     Texture2D bloodTexture = Content.Load<Texture2D>("blood");
     PrepareSadako(new Vector2(240, -300), sadakoTexture, playerReference, songHandler, grabTexture, bloodTexture, locationHandler);
 }
Esempio n. 3
0
 public void Initialize(Player playerGet, Sadako sadakoGet, Map mapGet, SongHandler songsGet, EventHandler eventsGet)
 {
     songs = songsGet;
     events = eventsGet;
     player = playerGet;
     sadako = sadakoGet;
     map = mapGet;
     currentLocation = new Vector2(0, 0);
     currentRoom = map.getRoom(currentLocation);
     sadakoRoom = currentRoom;
     sadako.disable = true;
     entryPoint = player.position;
 }
Esempio n. 4
0
 public void Initialize(Player playerGet, Sadako sadakoGet, Map mapGet, SongHandler songsGet, EventHandler eventsGet)
 {
     songs           = songsGet;
     events          = eventsGet;
     player          = playerGet;
     sadako          = sadakoGet;
     map             = mapGet;
     currentLocation = new Vector2(0, 0);
     currentRoom     = map.getRoom(currentLocation);
     sadakoRoom      = currentRoom;
     sadako.disable  = true;
     entryPoint      = player.position;
 }
Esempio n. 5
0
 public void PrepareSadako(Vector2 positionGet, Texture2D sadakoTexture, Player playerGet, SongHandler songGet, Texture2D captureTexture, Texture2D bloodTextureGet, LocationHandler locationHandler)
 {
     songs         = songGet;
     position      = positionGet;
     texture       = sadakoTexture;
     player        = playerGet;
     speed         = lurkSpeed;
     hitBox        = new Rectangle(0, 0, 30, 30);
     lurkHere      = positionGet;
     direction     = new Vector2(0, 0);
     player.sadako = this;
     wayPoints     = new List <Vector2>();
     lurking       = true;
     grabTexture   = captureTexture;
     bloodTexture  = bloodTextureGet;
     location      = locationHandler;
 }
Esempio n. 6
0
 public void PrepareSadako(Vector2 positionGet, Texture2D sadakoTexture, Player playerGet, SongHandler songGet, Texture2D captureTexture, Texture2D bloodTextureGet, LocationHandler locationHandler) 
 {
     songs = songGet;
     position = positionGet;
     texture = sadakoTexture;
     player = playerGet;
     speed = lurkSpeed;
     hitBox = new Rectangle(0, 0, 30, 30);
     lurkHere = positionGet;
     direction = new Vector2(0, 0);
     player.sadako = this;
     wayPoints = new List<Vector2>();
     lurking = true;
     grabTexture = captureTexture;
     bloodTexture = bloodTextureGet;
     location = locationHandler;
 }
Esempio n. 7
0
        public void PreparePlayer(Texture2D playerTextureGet, Texture2D buttonTexture, Vector2 positionGet, Texture2D lightTextureGet, Texture2D noLightTextureGet, Texture2D filmTextureGet, SongHandler songGet, LocationHandler locationHandler, InventoryHandler inventoryHandler)
        {
            inventory        = inventoryHandler;
            location         = locationHandler;
            songs            = songGet;
            playerTexture    = playerTextureGet;
            lightTexture     = lightTextureGet;
            noLightTexture   = noLightTextureGet;
            filmTexture      = filmTextureGet;
            position         = positionGet;
            life             = maxLife;
            hitBox           = new Rectangle(0, 0, 30, 30);
            flashLightHitbox = new Rectangle(0, 0, 150, 150);
            shadowHitBox     = new Rectangle(0, 0, 150, 150);
            presenceBox      = new Rectangle(0, 0, 90, 90);
            Vector2 buttonPosition = new Vector2(480, 160);

            playerController = new PlayerController(buttonTexture, this, location);
            direction        = new Vector2(0, 0);
            isFlashLightOn   = true;
            songs.playAmbient();
        }
Esempio n. 8
0
        public void Initialize(ContentManager Content, Vector2 startingPosition, Texture2D simpleTexture, SongHandler songHandler, LocationHandler locationHandler, InventoryHandler inventoryHandler)
        {
            // Load the content
            Texture2D lightTexture   = Content.Load <Texture2D>("light");
            Texture2D noLightTexture = Content.Load <Texture2D>("nolight");
            Texture2D filmTexture    = Content.Load <Texture2D>("film");
            Texture2D playerTexture  = Content.Load <Texture2D>("player");
            Texture2D buttonTexture  = Content.Load <Texture2D>("joystickhead");

            // TODO: Load the player's textures
            PreparePlayer(simpleTexture, buttonTexture, startingPosition, lightTexture, noLightTexture, filmTexture, songHandler, locationHandler, inventoryHandler);
        }
Esempio n. 9
0
 public void PreparePlayer(Texture2D playerTextureGet, Texture2D buttonTexture,Vector2 positionGet,Texture2D lightTextureGet,Texture2D noLightTextureGet, Texture2D filmTextureGet, SongHandler songGet, LocationHandler locationHandler, InventoryHandler inventoryHandler)
 {
     inventory = inventoryHandler;
     location = locationHandler;
     songs = songGet;
     playerTexture = playerTextureGet;
     lightTexture = lightTextureGet;
     noLightTexture = noLightTextureGet;
     filmTexture = filmTextureGet;
     position = positionGet;
     life = maxLife;
     hitBox = new Rectangle(0,0,30,30);
     flashLightHitbox = new Rectangle(0, 0, 150, 150);
     shadowHitBox = new Rectangle(0, 0,150, 150);
     presenceBox = new Rectangle(0, 0, 90, 90);
     Vector2 buttonPosition = new Vector2(480, 160);
     playerController = new PlayerController(buttonTexture,this,location);
     direction = new Vector2(0, 0);
     isFlashLightOn = true;
     songs.playAmbient();
 }
Esempio n. 10
0
        public void Initialize(ContentManager Content, Vector2 startingPosition, Texture2D simpleTexture, SongHandler songHandler, LocationHandler locationHandler, InventoryHandler inventoryHandler)
        {
            // Load the content
            Texture2D lightTexture = Content.Load<Texture2D>("light");
            Texture2D noLightTexture = Content.Load<Texture2D>("nolight");
            Texture2D filmTexture = Content.Load<Texture2D>("film");
            Texture2D playerTexture = Content.Load<Texture2D>("player");
            Texture2D buttonTexture = Content.Load<Texture2D>("joystickhead");

            // TODO: Load the player's textures
            PreparePlayer(simpleTexture, buttonTexture, startingPosition, lightTexture, noLightTexture, filmTexture, songHandler, locationHandler, inventoryHandler);
        }
Esempio n. 11
0
        public void Initialize(ContentManager Content, Vector2 sadakoStartingPosition, SongHandler songHandler, Player playerReference, LocationHandler locationHandler)
        {
            Texture2D sadakoTexture = Content.Load <Texture2D>("image");
            Texture2D grabTexture   = Content.Load <Texture2D>("waifu");
            Texture2D bloodTexture  = Content.Load <Texture2D>("blood");

            PrepareSadako(new Vector2(240, -300), sadakoTexture, playerReference, songHandler, grabTexture, bloodTexture, locationHandler);
        }
Esempio n. 12
0
        protected override void Initialize()
        {
            // Sample texture, 1x1 pixel for testing.
            simpleTexture = new Texture2D(GraphicsDevice, 1, 1);
            simpleTexture.SetData(new[] { Color.White });

            // Initializes the accelerometer.
            initializeAccelerometer();

            // Databases
            tileDatabase = new TileDatabase();
            roomDatabase = new RoomDatabase();

            // Handlers
            songHandler = new SongHandler();
            inventoryHandler = new InventoryHandler();
            eventHandler = new EventHandler();
            locationHandler = new LocationHandler();

            // Objects
            mapDefinition = new Map();
            sadakoReference = new Sadako();
            playerReference = new Player();

            // M! game profiler for FPS and other related stuff
            #if DEBUG
            Components.Add(new GameProfiler(this, Content));
            #endif

            base.Initialize();
        }