Example #1
0
    public void init()
    {
        Debug.Log("init");
        index = 0;
        textIndex = 1;
        textAnim = false;
        drawText(true);

        //エフェクト初期化
        for(int n = 0; n < backgrounds.Length; n++)
        {
            backgrounds[n].End.init(backgrounds[n].background);
            backgrounds[n].Start.init(backgrounds[n].background);
            for (int m = 0; m < backgrounds[n].normal.Length; m++)
            {
                backgrounds[n].normal[m].init(backgrounds[n].Start.effectColor);
            }
        }
        effectAllFlag = false;
        effectFlag = EFFECTFLAG.START;
    }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        if (effectFlag == EFFECTFLAG.START)
        {
            foreach(ADVBackground g in backgrounds) {
                effectAllFlag = g.Start.proc(Time.deltaTime,g.background);
            }
            if (effectAllFlag)
            {
                effectFlag = EFFECTFLAG.NON;
                effectAllFlag = false;
            }
        }
        else if(effectFlag == EFFECTFLAG.NON)
        {
            foreach (ADVBackground g in backgrounds)
            {
                foreach (ADVEffect e in g.normal)
                {
                    e.proc(Time.deltaTime, g.background,g.background);
                }
            }
        }
        else if(effectFlag == EFFECTFLAG.END)
        {
            foreach (ADVBackground g in backgrounds)
            {
                effectAllFlag = g.End.proc(Time.deltaTime, g.background,g.background);
            }
            if (effectAllFlag)
            {
                advManager.nextScene();
            }
        }

        if (Input.GetMouseButtonDown(0) && effectFlag != EFFECTFLAG.END)
        {
            Debug.Log("タッチ<scaneManager>");
            if (textAnim)
            {
                Debug.Log("アニメーション省略<scaneManager>");
                textIndex = texts[index].text.Length + 1;
            }
            else
            {
                index++;
                if (index < texts.Count)
                {
                    texts[index].start(canvas, charaImagePosY);
                    texts[index-1].end();
                    drawText(true);
                }
                else
                {
                    texts[index-1].end();
                    effectFlag = EFFECTFLAG.END;
                    //advManager.nextScene();
                }
            }
        }
        drawText(false);
    }
Example #3
0
 void Start()
 {
     effectFlag = EFFECTFLAG.START;
     if (textAnim)
     {
         init();
     }
 }