Ejemplo n.º 1
0
    void mouseClicked()
    {
        print("## Story.cs: mouseClicked() method + " + SingletonData.Instance.globalStoryInDalogue);
        mGuiBox.showBox(true);
        // mGuiBox.setTextInBox("angezeigt!!!!");


        if (SingletonData.Instance.globalStoryInDalogue && mGuiBox.mStoryActionArrayList.Count > mArrayPos)           // is in bounds of the array
        {
            print("---> first if arr pos: " + mArrayPos);
            if (mGuiBox.mStoryActionArrayList[mArrayPos].StartsWith("_Action:"))                // has "action" keyword in it
            {
                print("Action Str: " + mGuiBox.mStoryActionArrayList[mArrayPos].Substring(8));

                mGuiBox.showBox(false);
                mDisplayGuiBox    = false;
                mActionHasStarted = true;
                SingletonData.Instance.globalClickWalkingIsDisabled = false;
                SingletonData.Instance.globalStoryInDalogue         = false;
                handleAction(mGuiBox.mStoryActionArrayList[mArrayPos].Substring(8));
                mArrayPos++;
            }
            else                 // is a normal text phrase
            {
                mGuiBox.showBox(true);
                print("NORMAL TEXT MODE");
                mGuiBox.setTextInBox(mGuiBox.mStoryActionArrayList[mArrayPos]);
                SingletonData.Instance.globalStoryInDalogue = true;
                mArrayPos++;
            }
        }
        else             // not in bounds of the array
        {
            mGuiBox.showBox(false);
            print("else block");
        }
    }