Пример #1
0
 public void RotateTunerOnce(float DeltaTime)
 {
     Background.Rotate(new Vector3(0, 0, DeltaTime * CurrentBpm / 10));
     Border.Rotate(new Vector3(0, 0, -DeltaTime * 2 * CurrentBpm / 10));
     JudgeLine.Rotate(new Vector3(0, 0, -DeltaTime * 2 * CurrentBpm / 10));
     Arrow.Rotate(new Vector3(0, 0, DeltaTime * 3 * CurrentBpm / 10));
     Core.Rotate(new Vector3(0, 0, -DeltaTime * 0.3f * CurrentBpm / 10));
 }
Пример #2
0
    void Start()
    {
        instance = this;

        LineDrawer            = GetComponent <LineRenderer>();
        LineDrawer.startColor = Color.grey;
        LineDrawer.endColor   = Color.grey;

        Vector3 worldPoint;

        RectTransformUtility.ScreenPointToWorldPointInRectangle(
            GetComponent <RectTransform>(),
            gameObject.transform.position, Camera.main, out worldPoint);

        basex = worldPoint.x;
        basey = worldPoint.y;
    }