Beispiel #1
0
        public void AreFruitBatsAndDraculaBats()
        {
            FruitBat fbat  = new FruitBat();
            Dracula  count = new Dracula();

            Assert.Equal(fbat.SleepAt(), count.SleepAt());
        }
Beispiel #2
0
        public void AreDraculaDifferentFromFruitBats()
        {
            FruitBat fbat  = new FruitBat();
            Dracula  count = new Dracula();

            Assert.NotEqual(fbat.EatsWhat(), count.EatsWhat());
        }
        public override void Tick(Config config, AbigailGame game)
        {
            if (game.whichRound > 0 && AbigailGame.whichWave == 12)
            {
                if (AbigailGame.monsters.Count != 1)
                {
                    return;
                }
                Dracula dracula = AbigailGame.monsters.Last() as Dracula;
                if (dracula is null)
                {
                    return;
                }

                if (config.FixBossHPOverflow && dracula.health > dracula.fullHealth)
                {
                    int baseHealth = dracula.fullHealth;
                    dracula.fullHealth = dracula.health;
                    if (config.HarderFinalBoss)
                    {
                        dracula.fullHealth = baseHealth * (game.whichRound + 1);
                        dracula.health     = dracula.fullHealth;
                    }
                }
            }
        }
Beispiel #4
0
    // Use this for initialization
    void Start()
    {
        continueBtn.SetActive(false);
        difficulty = PlayerPrefs.GetInt("Difficulty");
        startTime  = Time.time;
        Vlad       = GameObject.FindGameObjectWithTag("Dracula");
        drac       = Vlad.GetComponent <Dracula> ();
        StartCoroutine(IntroCutscene());
        winLose.enabled = false;
        night           = PlayerPrefs.GetInt("Night");

        if (difficulty == 1)
        {
            victimsLeft = 2 + night;
            hour        = 5;
            if (night == 3 || night >= 5)
            {
                constable.SetActive(true);
            }
            if (night >= 2)
            {
                vulture.GetComponent <Vulture> ().alive = true;
            }
        }
        else if (difficulty == 2)
        {
            victimsLeft = 5 + night;
            hour        = 5;
            if (night >= 2)
            {
                constable.SetActive(true);
            }
            vulture.GetComponent <Vulture> ().alive = true;
        }
        else if (difficulty == 3)
        {
            victimsLeft = 8 + night;
            hour        = 6;
            constable.SetActive(true);
            vulture.GetComponent <Vulture> ().alive = true;
        }
        victimT.text = "Victims Left: " + victimsLeft;
    }
Beispiel #5
0
    // Use this for initialization
    void Awake()
    {
        plr = GetComponentInChildren<Player>();
        plr.Setup(this);

        TUNING = Resources.Load("Scripts/Tuning") as DTTuning;

        Hours = gameObject.AddComponent<HoursManager>();
        Hours.Setup(this);

        remainingDay = TUNING.DaysComingBeforeSaveDay;

        pathDirector = GetComponentInChildren<WaypointDirector>();
        pathDirector.Setup(this);

        Dracu = GetComponentInChildren<Dracula>();
        Dracu.Setup(this);

        Diff = DifficultyState.BeforeLetter;

        PaperSpots = new List<GameObject>();
        GameObject pSpot = FETool.findWithinChildren(gameObject, "Spots/PaperSpot");
        Spot[] papSpot = pSpot.GetComponentsInChildren<Spot>();
        foreach (Spot obj in papSpot)
        {
            obj.spotType = Spot.spotList.Paper;
            PaperSpots.Add(obj.gameObject);
        }

        FoodSpots = new List<GameObject>();
        GameObject fSpot = FETool.findWithinChildren(gameObject, "Spots/FoodSpot");
        Spot[] fooSpot = fSpot.GetComponentsInChildren<Spot>();
        foreach (Spot obj in fooSpot)
        {
            obj.spotType = Spot.spotList.Food;
            FoodSpots.Add(obj.gameObject);
        }

        //		respawnPaper(PaperSpots);
        spawnFood(FoodSpots);
        saveDay = 1000;

        MailmanState = MailManStateList.Away;
        currCam = FETool.findWithinChildren(gameObject, "Camera").GetComponent<Camera>();
        GameUI = currCam.GetComponentInChildren<UI>();
        GameUI.Setup(this);

        GetComponentInChildren<MailManPlace>().Setup(this);
        bedList = GetComponentsInChildren<Bed>();

        Door[] Doors = GetComponentsInChildren<Door>();
        foreach (Door _dr in Doors)
        {
            _dr.Setup(this);
        }

        Waypoint[] Waypo = GetComponentsInChildren<Waypoint>();
        foreach (Waypoint _wp in Waypo)
        {
            wpList.Add(_wp);
        }

        GameEventManager.GameOver += GameOver;
        GameEventManager.Respawn += Respawn;
        GameEventManager.GameStart += GameStart;
        GameEventManager.EndGame += EndGame;

        MasterAudio.PlaySound("ambiance");

        //				GAMESTATE = GameEventManager.GameState.MainMenu;
        //				GameEventManager.TriggerRespawn("Rsp");
        GAMESTATE = GameEventManager.GameState.Live;
        GameEventManager.TriggerGameStart("First Init");
    }