Exemple #1
0
        public override void Load()
        {
            TwinSight         = RegisterHotKey("Twin Sight", "Z");
            Main.tileCut[231] = false;
            if (!Main.dedServ)
            {
                //AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Optime"), ItemType("OptimeMusicBox"), TileType("OptimeMusicBox"));
                //AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/NiceGuy"), ItemType("NGMusicBox"), TileType("NGMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/CavityMusic"), ItemType("CavityMusicBox"), TileType("CavityMusicBox"));
                AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/FallenAngel"), ItemType("FAMusicBox"), TileType("FAMusicBox"));

                BarUIStateInfection = new InfectionBar();
                BarUIStateInfection.Activate();
                BarInterfaceInfection = new UserInterface();
                BarInterfaceInfection.SetState(BarUIStateInfection);
            }
            //Filters.Scene["StarShower"] = new Filter(new ScreenShaderData("FilterBloodMoon").UseColor(1.86f, 1.78f, 2.26f).UseOpacity(1f), EffectPriority.VeryHigh);
            Filters.Scene["Host"] = new Filter(new ScreenShaderData("FilterMiniTower").UseColor(2.56f, 2f, 0.54f).UseOpacity(0.5f), EffectPriority.VeryHigh);

            instance = this;

            if (!Main.dedServ)
            {
                PremultiplyTexture(GetTexture("NPCs/FallenAngel/Forcefield"));
            }
        }
Exemple #2
0
    void Start()
    {
        //Button listener method
        // 0 - True, 1 - False
        ans1.onClick.AddListener(delegate { ChosenAnswer(0); });
        ans2.onClick.AddListener(delegate { ChosenAnswer(1); });

        // access score Script
        scoreScript = GameObject.Find("Quiz UI/Scores").GetComponent <Score>();
        infectionB  = GameObject.Find("Quiz UI/InfectionBarContainer/HealthBar").GetComponent <InfectionBar>();

        // access storage script
        levelScript = GameObject.Find("Quiz UI").GetComponent <Level>();
    }
Exemple #3
0
 public void SetContagious()
 {
     allowInputs = true;
     //countdownBar.maxValue = -10;
     countDown    = false;
     currentState = State.Contagious;
     HUD.SetActive(true);
     StartUI.SetActive(false);
     SickUI.SetActive(false);
     Sun.gameObject.GetComponent <SunDawn>().SetActive();
     TimeCounter.gameObject.GetComponent <TimedownCounter>().SendMessage("SetContinueTime");
     InfectionBar.SetActive(false);
     InfectionStatus.gameObject.GetComponent <Text>().text  = "COVID POSITIVO";
     InfectionStatus.gameObject.GetComponent <Text>().color = Color.red;
     playerSpeed = 3;
     ambient.Play();
 }
Exemple #4
0
        private void UnloadUI()
        {
            VeritasAbilityKey = null;
            Bandolier         = null;
            SoulBank          = null;

            VitalityAbilityKey = null;
            _interfaceVitality = null;
            vitalityBar        = null;

            _interfaceShieldBroken = null;
            shieldBrokenUI         = null;

            _interfaceInfectionBar = null;
            infectionBar           = null;

            _interfaceNoteUI = null;
            noteUI           = null;
        }
Exemple #5
0
        private void LoadUI()
        {
            vitalityBar = new VitalityBar();
            vitalityBar.Activate();
            _interfaceVitality = new UserInterface();
            _interfaceVitality.SetState(vitalityBar);

            shieldBrokenUI = new ShieldBrokenUI();
            shieldBrokenUI.Activate();
            _interfaceShieldBroken = new UserInterface();
            _interfaceShieldBroken.SetState(shieldBrokenUI);

            infectionBar = new InfectionBar();
            infectionBar.Activate();
            _interfaceInfectionBar = new UserInterface();
            _interfaceInfectionBar.SetState(infectionBar);

            noteUI = new NoteUI();
            noteUI.Activate();
            _interfaceNoteUI = new UserInterface();
            _interfaceNoteUI.SetState(noteUI);
        }
Exemple #6
0
    void Start()
    {
        //Set the max value to the refill time
        rb = GetComponent <Rigidbody>();
        if (currentLevelInt == 0)
        {
            threshold_money = 3000;
        }
        else if (currentLevelInt == 1)
        {
            print("LVL2!");
            threshold_money = 4000;
            StartUI.SetActive(false);
            HUD.SetActive(true);
            ambient.Play();
            TimeCounter.gameObject.GetComponent <TimedownCounter>().SendMessage("ChangeFlag");
            Sun.gameObject.GetComponent <SunDawn>().SetActive();

            if (contagiusBool)
            {
                currentState                = State.Contagious;
                threshold_money             = threshold_money + 500 * (currentLevelInt + 1);
                totalmoney.text             = threshold_money.ToString();
                VirusEmitter.enableEmission = true;
                VirusEmitter.Play();
                playerSpeed = 3;
                InfectionBar.SetActive(false);
                InfectionStatus.gameObject.GetComponent <Text>().text  = "COVID POSITIVO";
                InfectionStatus.gameObject.GetComponent <Text>().color = Color.red;
            }
            else
            {
                currentState = State.Active;
            }
        }
        else if (currentLevelInt == 2)
        {
            threshold_money = 5000;
            StartUI.SetActive(false);
            HUD.SetActive(true);
            allowInputs = true;
            ambient.Play();
            //TimeCounter.gameObject.GetComponent<TimedownCounter>().SendMessage("ChangeFlag");
            Sun.gameObject.GetComponent <SunDawn>().SetActive();
            if (contagiusBool)
            {
                currentState                = State.Contagious;
                threshold_money             = threshold_money + 500 * (currentLevelInt + 1);
                totalmoney.text             = threshold_money.ToString();
                VirusEmitter.enableEmission = true;
                VirusEmitter.Play();
                playerSpeed = 3;
                InfectionBar.SetActive(false);
                InfectionStatus.gameObject.GetComponent <Text>().text  = "COVID POSITIVO";
                InfectionStatus.gameObject.GetComponent <Text>().color = Color.red;
            }
            else
            {
                currentState = State.Active;
            }
        }
        totalmoney.text = threshold_money.ToString();
    }