Exemplo n.º 1
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);
 }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
0
        public PlayerController(Texture2D textureGet, Player playerGet,LocationHandler locationGet)
        {
            texture = textureGet;
            location = locationGet;

            initialPosition = new Vector2(720, 400);
            currentPosition = new Vector2(720, 400);
            player = playerGet;
            totalPlayField = playFieldWidth + 40;
            controllerarea = new Rectangle(800 - 160, 480 - 150, 150, 150);
            buttonarea = new Rectangle(640, 270, 76, 60);

            flashLightArea = new Rectangle(650,200,75,70);
            flashLightPosition = new Vector2(650, 218);

            initializeBeat();
        }
Exemplo n.º 4
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();
 }
Exemplo n.º 5
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);
        }
Exemplo 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;
 }
Exemplo n.º 7
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);
        }
Exemplo n.º 8
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();
        }