示例#1
0
    public void Shrink()
    {
        new_timekeeper d3 = scriptbox.GetComponent <new_timekeeper>();

        Sunwarp(d3.duration / 24);
        B_shrinking.SetActive(true);
        Invoke("SDelayMethod", 7f);
    }
示例#2
0
    //バグ、risekakudoto


    void Update()
    {
        new_timekeeper d3 = scriptbox.GetComponent <new_timekeeper>();

        //Debug.Log("duration="+d3.duration_fixed);
        //Debug.Log("risekakudoになるはず=" + d3.duration_fixed/24 * 360);

        Kakudosetter();

        //太陽の登場と消滅について
        if (d3.duration_fixed / 24 * 360 + 5 <= risekakudo || d3.duration_fixed / 24 * 360 - 5 >= setkakudo)//端数そろえ
        {
            if (existflag == false)
            {
                minisunA.SetActive(false);
            }
            else
            {
                minisunA.SetActive(true);
            }
        }
        else
        {
            minisunA.SetActive(true);
        }



        if ((d3.duration_fixed / 24 * 360 < risekakudo || d3.duration_fixed / 24 * 360 > setkakudo) && flag != 2)
        {
            if (existflag == true)
            {
                line         = center.GetComponent <LineRenderer>();
                line.enabled = true;
                line.SetVertexCount(segments + 1);//segments +1 だったがゴミが付くのでやめ
                line.useWorldSpace = false;
                CreatePoints();
            }
            else
            {
                line         = center.GetComponent <LineRenderer>();
                line.enabled = false;
            }
        }
        else
        {
            line         = center.GetComponent <LineRenderer>();
            line.enabled = false;
        }
    }
示例#3
0
    void Update()
    {
        new_timekeeper d3 = scriptbox.GetComponent <new_timekeeper>();

        // Debug.Log("duration=" + d3.duration_fixed);
        //Debug.Log("risekakudoになるはず=" + d3.duration_fixed / 24 * 360);


        Kakudosetter();
        line = center.GetComponent <LineRenderer>();

        line.SetVertexCount(segments + 1);//segments +1 だったがゴミが付くのでやめ

        line.useWorldSpace = false;
        CreatePoints();
    }
示例#4
0
    void CreatePoints()
    {
        float y;

        float angle = risekakudo;

        for (int i = 0; i < (segments + 1); i++)
        {
            new_timekeeper d3 = scriptbox.GetComponent <new_timekeeper>();

            circlex = Mathf.Sin(Mathf.Deg2Rad * angle) * xradius;
            circlez = Mathf.Cos(Mathf.Deg2Rad * angle) * yradius;

            _x = circlex;
            _z = circlez;
            //            if(angle>risekakudo)
            line.SetPosition(i, new Vector3(_x, _y, _z));

            //常時表示モード flag = 0
            if (flag == 0)
            {
                angle += ((setkakudo - risekakudo) / segments);
            }
            //順次表示モード flag = 1
            else if (flag == 1)
            {
                if (d3.duration_fixed / 24 * 360 < setkakudo && d3.duration_fixed / 24 * 360 > risekakudo)
                {
                    angle += (((d3.duration_fixed / 24 * 360) - risekakudo) / segments);
                }
                else
                {
                    //            line.SetVertexCount(0);
                }
            }
            //非表示モード flag = 2
            else
            {
                //          line.SetVertexCount(0);
            }
        }
    }
示例#5
0
    public void Sunrisetime(float time)
    {
        new_timekeeper d3 = scriptbox.GetComponent <new_timekeeper>();

        d3.duration = time;
    }