예제 #1
0
    public override void Create()
    {
        Vector3    createPosition = GameTools.getMouseToPlaneRayPosition();
        GameObject obj            = GameObject.Instantiate(jineng4_yunshi, createPosition + new Vector3(0, 30, 0), transform.rotation);

        obj.transform.LookAt(createPosition);
        circle_com = (TrollDrawLine)GameObject.Instantiate(circle, createPosition + new Vector3(0, 0.2f, 0), transform.rotation).GetComponent <TrollDrawLine>();
        circle_com.setRadius(max_radius);
        Destroy(circle_com.gameObject, 2f);
    }
예제 #2
0
    private void changeCircle()
    {
        t1 += Time.deltaTime;
        if (t1 > keep_time)
        {
            t1 = 0f;
        }
        radius = max_radius * (1f - t1 / keep_time);

        circle_com.setRadius(max_radius);
        circle_com2.setRadius(radius);
    }
예제 #3
0
    // Update is called once per frame
    void Update()
    {
        if (Time.timeScale == 0)
        {
            return;
        }
        t1 += Time.deltaTime;
        if (t1 > keep_time)
        {
            t1 = 0f;
        }
        radius = max_radius * (t1 / keep_time);

        circle_com.setRadius(max_radius);
        circle_com2.setRadius(radius);

        //if (Input.GetKeyDown(KeyCode.J))
        //    ogj.GetComponent<sMove>().changeSpeed(0, 0.8f, 3f);
        //if (Input.GetKeyDown(KeyCode.K))
        //    ogj.GetComponent<sMove>().changeSpeed(1, -2f, 3f);
        //if (Input.GetKeyDown(KeyCode.L))
        //    ogj.GetComponent<sMove>().changeSpeed(0, 1.2f, 3f);
    }