Esempio n. 1
0
    void OnMouseUp()
    {
        //send email on click
        SG_Email sg_emailComponent = Camera.main.GetComponent("SG_Email") as SG_Email;

        if (isSMTP)
        {
            sg_emailComponent.SendSendgridEmailSMTP();
        }
        else
        {
            sg_emailComponent.SendSendgridEmailWebAPI();
        }
    }
 // Use this for initialization
 void Start()
 {
     this.emailsent = false;
     this.started = false;
     this.numViolations = 0;
     this.canSMS = true;
     this.decibels = new List<DecibelEvent> ();
     this.twilio = this.GetComponent<TwilioMessaging> ();
     this.sendgrid = this.GetComponent<SG_Email> ();
     this.GetComponent<DecibelReader> ().setOnDecibel (this.OnDecibel);
     this.loadSaved ();
 }