Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        posX = transform.localPosition.x;
        posY = transform.localPosition.y;
        posZ = transform.localPosition.z;
        dimX = transform.localScale.x;
        dimY = transform.localScale.y;
        dimZ = transform.localScale.z;

        //height determines how high earth moves and timer determines how long it stays out
        earthHeight    = 8f;
        timer          = 5f;
        earthCreate    = true;
        earthFlagTimer = 0.0f;

        //fire animation stuff
        colorObject = new Vector4(GetComponent <SpriteRenderer>().color.r, GetComponent <SpriteRenderer>().color.g,
                                  GetComponent <SpriteRenderer>().color.b, GetComponent <SpriteRenderer>().color.a);
        speech          = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        vivi            = GameObject.Find("Witch character");
        iceAnim         = GameObject.Find("IceAnim");
        iceDrops        = GameObject.Find("IceDrops");
        rainAnim        = GameObject.Find("WaterAnim");
        rainDrops       = GameObject.Find("RainDrops");
        snowParticles   = GameObject.Find("SnowParticles").GetComponent <ParticleSystem>();
        bubbleParticles = GameObject.Find("BubbleParticles").GetComponent <ParticleSystem>();
        uiH             = GameObject.Find("UIH1").GetComponent <UIHistory>();
        wftimer         = 0.0f;
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        canTalk   = false;
        playScene = false;
        //load up the cutscnes and turn off activity
        for (int i = 0; i < cutscene.Length; i++)
        {
            cutscene[i].SetActive(false);
        }
        prayerAnimation.SetActive(false);
        timer   = 0f;
        Pray    = false;
        SPEECH  = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        vivi    = GameObject.Find("Witch character");
        ui      = GameObject.Find("UISpellManager");
        mmc     = GameObject.Find("MainMenuColor");
        sb      = GameObject.Find("SpellBook");
        book    = sb.GetComponent <SpellBook>();
        borders = GameObject.Find("comicBorder");
        borders.GetComponent <SpriteRenderer>().enabled = false;

        Por_next     = GameObject.Find("Por_Next2").GetComponent <Image>();
        Por_back     = GameObject.Find("Por_Back2").GetComponent <Image>();
        PorText_Next = GameObject.Find("PorText_Next2").GetComponent <Text>();
        PorText_Back = GameObject.Find("PorText_Back2").GetComponent <Text>();
        uiH          = GameObject.Find("UIH1").GetComponent <UIHistory>();
        hist         = GameObject.Find("HistoryBubble");
        initUIH      = GameObject.Find("UIH1").transform.localScale;
        initHis      = GameObject.Find("HistoryBubble").transform.localScale;
    }
Esempio n. 3
0
 private async Task Init()
 {
     await Task.Factory.StartNew(() =>
     {
         var list = mHistoryService.GetDaysExrecises(mUser);
         foreach (var item in list)
         {
             var history = mHistories.FirstOrDefault(a => a.Guid.Equals(item.Guid));
             if (history == null)
             {
                 history = new UIHistory()
                 {
                     Book        = item.Book,
                     BookTitle   = item.BookTitle,
                     Guid        = item.Guid,
                     Module      = item.Module,
                     Unit        = item.Unit,
                     ReviewCount = item.ReviewCount,
                     ReviewDate  = item.ReviewDate.ToString("yyyy-MM-dd"),
                     User        = item.User
                 };
                 mHistories.Add(history);
             }
             else
             {
                 history.ReviewCount = item.ReviewCount;
             }
         }
     });
 }
Esempio n. 4
0
    void Start()
    {
        //set hint timer here
        timer = 2f;

        //assigns hint images and then turns them off at the start of game
        speechBubble = GameObject.Find("CastHint").GetComponent <Image>();
        castFire     = GameObject.Find("CastFire").GetComponent <Image>();
        castWater    = GameObject.Find("CastWater").GetComponent <Image>();
        castIce      = GameObject.Find("CastIce").GetComponent <Image>();
        castWind     = GameObject.Find("CastWind").GetComponent <Image>();
        castEarth    = GameObject.Find("CastEarth").GetComponent <Image>();
        castRestore  = GameObject.Find("CastRestore").GetComponent <Image>();
        castShrink   = GameObject.Find("CastShrink").GetComponent <Image>();
        castGrow     = GameObject.Find("CastGrow").GetComponent <Image>();
        castAstral   = GameObject.Find("CastAstral").GetComponent <Image>();
        danger       = GameObject.Find("danger").GetComponent <Image>();

        castHint      = GameObject.Find("CastHint");
        castHint.text = "Move next to objects\n or obstacles and \nsay 'Cast hint'.";

        hint = "";

        ResetFlags();
        resetFlag = false;

        //assigns other helper functions
        avatar    = GameObject.Find("Witch character");
        uiH       = GameObject.Find("UIH1").GetComponent <UIHistory>();
        speechRec = GameObject.Find("SpeechRecognition01").GetComponent <SpeechRecognition01>();

        clock   = 0f;
        talking = false;
    }
Esempio n. 5
0
        void OnButton2Click()
        {
            UIHistory.StepOne();
            var data = new UIExampleModuleData3();

            UIElement.GetInstanceElementByData(data, UIStage.Instance.transform);
        }
Esempio n. 6
0
 // Use this for initialization
 void Start()
 {
     pos        = transform.position;
     posP       = parent.transform.position.y;
     followFlag = true;
     speech     = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
     uiH        = GameObject.Find("UIH1").GetComponent <UIHistory>();
     bhsp       = GameObject.Find("House").GetComponent <BurnedHouse_SpiritPuzzle>();
 }
Esempio n. 7
0
    // Use this for initialization
    void Start()
    {
        //listens for additional fake words alongside the current keywords
        Fakekeywords = new string[] {
            "earth", "rock", "mountain", "elevation", "cliff", "raise",
            "water", "aqua", "fill", "rain", "flood", "shower", "wet", "ocean", "precipitation", "puddle", "wave",
            "wind", "move", "gust", "blow", "push", "air", "gale", "puff", "breeze", "breath", "waft",
            "fire", "burn", "incinerate", "flame", "ember", "blaze", "pyre", "light", "destroy", "ignite", "torch", "burst", "combust",
            "cool", "ice", "snow", "crystal", "hail", "blizzard", "freeze", "cold", "winter",
            "restore", "return", "reset", "undo", "redo", "origin", "mend", "fix", "rebuild", "repair", "reconstruct",
            "grow", "big", "tall", "huge", "increase", "expand", "giant", "colossal", "enormous", "jumbo", "oversize", "massive",
            "shrink", "small", "mini", "narrow", "cramp", "decrease", "short", "tiny", "crouch",
            "hint", "question", "inquiry", "curious", "help", "confuse", "puzzle", "unclear", "lost", "clue", "idea", "tip", "advice",
            "prayer", "pray", "speak", "talk", "follow", "come",

            "move left", "left", "walk left", "run left", "move right", "right", "walk right", "run left", "jump", "climb", "turn"
        };

        for (int i = 0; i < Fakekeywords.Length - 11; i++)
        {
            Fakekeywords[i] = "CAST " + Fakekeywords[i];
        }

        for (int i = 0; i < 11; i++)
        {
            Fakekeywords[Fakekeywords.Length - (1 + i)] = "VIVI " + Fakekeywords[Fakekeywords.Length - (1 + i)];
        }

        if (Fakekeywords != null)
        {
            Fakerecognizer = new KeywordRecognizer(Fakekeywords, Fakeconfidence);
            Fakerecognizer.OnPhraseRecognized += Recognizer_OnPhraseRecognized;
            Fakerecognizer.Start();
        }
        spellbook = GameObject.Find("SpellBook").GetComponent <SpellBook>();
        book      = GameObject.Find("spellbook").GetComponent <SpriteRenderer>();
        speech    = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        moves     = GameObject.Find("Witch character").GetComponent <Movement>();
        uiH       = GameObject.Find("UIH1").GetComponent <UIHistory>();

        tip  = false;
        fake = false;
        playerbubble.enabled = false;
        command = "";
        timer   = 0f;

        int   dimx        = 1536;
        int   dimy        = 963;
        float unityScaleX = dimx / 1536F;
        float unityScaleY = dimy / 963F;

        GameObject.Find("PlayerUI").transform.localScale = new Vector3(Screen.width / 1536f * -0.65f * unityScaleX, Screen.height / 963f * 0.87f * unityScaleY, 1f);
    }
Esempio n. 8
0
    // Use this for initialization
    void Start()
    {
        timer  = 0;
        speech = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        uiH    = GameObject.Find("UIH1").GetComponent <UIHistory>();
        ava    = GameObject.Find("Witch character").GetComponent <AvatarSpells>();

        ambienceEvent = FMODUnity.RuntimeManager.CreateInstance(ambiencePath);

        ambienceCounter = 0;
        ambienceGoal    = (int)Random.Range(3600f, 4800f);
        ambienceEvent.start();
    }
Esempio n. 9
0
    void Start()
    {
        //modify these values if you want to change wind speed and
        //timer's initial starting value for delayed effect purposes
        windSpeed = 50;
        timer     = 0;

        animFlag = false;

        //assigns game object values for various use
        speech         = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        vivi           = GameObject.Find("Witch character");
        wind1          = GameObject.Find("WindAnim");
        wind2          = GameObject.Find("WindAnim2");
        WindParticlesL = GameObject.Find("WindParticlesLeft");
        WindParticlesR = GameObject.Find("WindParticlesRight");
        uiH            = GameObject.Find("UIH1").GetComponent <UIHistory>();
    }
Esempio n. 10
0
    // Use this for initialization
    void Start()
    {
        posX = transform.localPosition.x;
        posY = transform.localPosition.y;
        posZ = transform.localPosition.z;
        dimX = transform.localScale.x;
        dimY = transform.localScale.y;
        dimZ = transform.localScale.z;

        //Fire animation stuff
        colorObject = new Vector4(GetComponent <SpriteRenderer>().color.r, GetComponent <SpriteRenderer>().color.g,
                                  GetComponent <SpriteRenderer>().color.b, GetComponent <SpriteRenderer>().color.a);

        fireAnim  = false;
        fireTimer = 0f;
        speech    = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        animFire  = GameObject.Find("FireAnim");
        vivi      = GameObject.Find("Witch character");
        uiH       = GameObject.Find("UIH1").GetComponent <UIHistory>();

        restoreOverride = false;
    }
Esempio n. 11
0
    // Use this for initialization
    void Start()
    {
        originalPosition = transform.position;

        leftCollider.SetActive(true);
        rightCollider.SetActive(true);

        speech    = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        uiH       = GameObject.Find("UIH1").GetComponent <UIHistory>();
        avatar    = GameObject.Find("Witch character");
        earth     = GameObject.Find("earth");
        pushRight = false;
        pushLeft  = false;
        dontMove  = false;

        //turns off animation for sail in particular
        sailAni.SetActive(false);

        splash = FMODUnity.RuntimeManager.CreateInstance(splashPath);
        moving = false;

        rb = GetComponent <Rigidbody2D>();
    }
Esempio n. 12
0
    // Use this for initialization
    void Start()
    {
        systemMode   = true;
        canPray      = false;
        shrineAnim   = false;
        followAnim   = false;
        prayAnim     = false;
        shrineTimer  = 0f;
        shrines      = GameObject.FindGameObjectsWithTag("shrine");
        speech       = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        user         = GameObject.Find("UISpellManager").GetComponent <UserInterface>();
        vivi         = GameObject.Find("Witch character");
        viviPor      = GameObject.Find("ViviPortrait").GetComponent <Image>();
        spiritPor    = GameObject.Find("NPCPortrait").GetComponent <Image>();
        Por_next     = GameObject.Find("Por_Next").GetComponent <Image>();
        Por_back     = GameObject.Find("Por_Back").GetComponent <Image>();
        PorText_Next = GameObject.Find("PorText_Next").GetComponent <Text>();
        PorText_Back = GameObject.Find("PorText_Back").GetComponent <Text>();
        box          = GameObject.Find("DialogueBox");
        text         = GameObject.Find("Dialogue").GetComponent <Text>();
        sprite       = GameObject.Find("MainMenuColor").GetComponent <SpriteRenderer>();
        vivi_anim    = vivi.GetComponent <Animator>();
        uiH          = GameObject.Find("UIH1").GetComponent <UIHistory>();
        sb           = GameObject.Find("SpellBook").GetComponent <SpellBook>();

        Por_next.enabled     = false;
        Por_back.enabled     = false;
        PorText_Next.enabled = false;
        PorText_Back.enabled = false;

        musicManagerObj = GameObject.FindGameObjectWithTag("Music Manager");
        musicManager    = musicManagerObj.GetComponent <MusicManager>();
        initPos         = transform.position;
        textsize        = text.fontSize;
        spokeTo         = false;
    }
Esempio n. 13
0
    // Use this for initialization
    void Start()
    {
        //these access various gameobjects like Ui stuff, spellbook, speech recognition, etc.
        speech  = GameObject.Find("SpeechRecognition").GetComponent <SpeechRecognition01>();
        ui      = GameObject.Find("UISpellManager").GetComponent <UserInterface>();
        book    = GameObject.Find("SpellBook");
        viviPor = GameObject.Find("ViviPortrait").GetComponent <Image>();
        spirit  = GameObject.Find("NPC_Spirit");
        vivi    = GameObject.Find("Witch character");
        thingbuttonthingythingy = GameObject.Find("RedButton");
        //these access all the tutorials in intro level
        bookT    = GameObject.Find("tutorial_spellbook");
        speakT   = GameObject.Find("tutorial_speak");
        castT    = GameObject.Find("tutorial_cast");
        restoreT = GameObject.Find("tutorial_restore");
        followT  = GameObject.Find("tutorial_follow");
        prayerT  = GameObject.Find("tutorial_prayer");
        diaryT   = GameObject.Find("tutorial_diary");

        //resets spell animations
        GameObject.Find("UseSpellAnim").GetComponent <UseSpell>().Active = false;
        book.GetComponent <SpellBook>().resetFlags2();

        //turns off the later tutorials untilthey'reneeded
        bookT.GetComponent <SpriteRenderer>().enabled            = false;
        bookT.GetComponentInChildren <MeshRenderer>().enabled    = false;
        speakT.GetComponent <SpriteRenderer>().enabled           = false;
        speakT.GetComponentInChildren <MeshRenderer>().enabled   = false;
        castT.GetComponent <SpriteRenderer>().enabled            = false;
        castT.GetComponentInChildren <MeshRenderer>().enabled    = false;
        restoreT.GetComponent <SpriteRenderer>().enabled         = false;
        restoreT.GetComponentInChildren <MeshRenderer>().enabled = false;
        followT.GetComponent <SpriteRenderer>().enabled          = false;
        followT.GetComponentInChildren <MeshRenderer>().enabled  = false;
        prayerT.GetComponent <SpriteRenderer>().enabled          = true;
        prayerT.GetComponentInChildren <MeshRenderer>().enabled  = true;
        diaryT.GetComponent <SpriteRenderer>().enabled           = false;
        diaryT.GetComponentInChildren <MeshRenderer>().enabled   = false;

        //resets a bunch of UI stuff
        ui.hint     = "";
        title.color = new Vector4(80f, 255f, 255f, 0f);
        gameObject.GetComponent <SpriteRenderer>().color = new Vector4(255f, 255f, 255f, 255f);
        speech.canSpell = false;
        GameObject.Find("SoundEffects").GetComponent <test2>().enabled = false;
        uiH      = GameObject.Find("UIH1").GetComponent <UIHistory>();
        bookSize = book.transform.localScale;
        book.transform.localScale = new Vector3(1f, 0f, 1f);
        initPos = puzzleSpirit.transform.position;
        book.GetComponent <SpellBook>().enabled = false;
        uiSize = ui.transform.localScale;
        ui.transform.localScale = new Vector3(1f, 0f, 1f);
        ui.enabled = false;
        iconSize   = UIicon.transform.localScale;
        UIicon.transform.localScale     = new Vector3(1f, 0f, 1f);
        UIiconMenu.transform.localScale = new Vector3(1f, 0f, 1f);

        //ignore this code below; its old and not used anymore
        greenSpiritT = "Thank You";
        greenSpiritM = puzzleSpirit.GetComponent <NPCSpells>().spiritMessage[0];
        greenSpiritC = puzzleSpirit.GetComponentInChildren <SpriteRenderer>().color;
        viviPortrait = new Vector4(viviPor.color.r, viviPor.color.g, viviPor.color.b, 1f);
    }