Esempio n. 1
0
        public Sezione CreaSezione()
        {
            Sezione s = new Sezione();

            sezioni.Add(s);
            return(s);
        }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        if (spline != null)
        {
            float direzione = Input.GetAxis("Vertical");

            //dir = new Vector3(1,direzione, 0);
            Vector3 fwd = (spline[spline.Count - 1].position - spline[spline.Count - 2].position).normalized;
            dir = Quaternion.Euler(0, 0, 40 * direzione) * fwd;
            if (Input.GetButtonDown("Fire1"))
            {
                NewBranchPiece();
            }
        }
        else
        {
            if (Input.GetButtonDown("Fire1"))
            {
                Sezione sez = selectedSezione.GetComponent <Sezione>();
                Debug.Log(sez);
                spline = sez.GetAttach().GetComponentInChildren <BezierSpline>();
                mc     = selectedSezione.GetComponentInChildren <MeshCollider>();
                mf     = mc.gameObject.GetComponentInChildren <MeshFilter>();
                // selectedSezione.GetComponent<Sezione>()
            }
        }
    }
Esempio n. 3
0
 public Task <int> SaveSezioneAsync(Sezione item)
 {
     if (item.Id /*!*/ == 0)
     {
         return(Database.UpdateAsync(item));
     }
     else
     {
         return(Database.InsertAsync(item));
     }
 }
Esempio n. 4
0
 public Task <int> DeleteSezioneAsync(Sezione item)
 {
     return(Database.DeleteAsync(item));
 }