Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        _sources = MoveSource.GetSources();
        sources  = GetSourceIndices();
        GetMaxHeight();

        if (Input.GetKeyDown(KeyCode.Space) && sources.Count() != 0)
        {
            UpdateDepths();
            heightChangeForEachSource();
            Destroy(mesh);
            CreateMesh();
            removeLines();
            MaxHeight = 0;
            GetMaxHeight();
            DrawLine();
        }
    }
Beispiel #2
0
 // Use this for initialization
 void Awake()
 {
     ScaleY   = Mathf.Sqrt(Mathf.Pow(ScaleX, 2) - Mathf.Pow(ScaleX / 2, 2));
     _sources = MoveSource.GetSources();
 }