public void Event_OnReceiveImage(TendresseData tData) { Debug.Log("draw 1"); //DateManager.instance.DrawImageAt(tData, Vector3.zero, 1f); DateManager.instance.GetCurrentEvent().SetImage(tData); DateManager.instance.ExecuteDateEvent_TextPhase(); }
public DateEvent(string q, bool d) { question = q; answer = ""; image = new TendresseData(); mediaIsDrawing = d; sound = new message("sendSound"); }
public void Event_OnSendImage(TendresseData tData) { Debug.Log("Beginning Send Message"); DateManager.instance.GetCurrentEvent().SetImage(tData); message mes = NetManager.instance.MakeMessageFromImage(tData); Debug.Log("Created Message" + conversionTools.convertMessageToString(mes)); NetManager.instance.SendMessage(mes); Debug.Log("Sent Message"); }
public void SetImage(TendresseData var) { image = var; }
/// <summary> /// Load a drawing into this widget's drawing zone /// </summary> /// <param name="drawing">The drawing data</param> public void DisplayDrawing(Tendresse.Data.TendresseData drawing) { this.drawingData = drawing; this.drawDrawing = true; }
public message MakeMessageFromImage(TendresseData image) { message img = new message("sendImage"); for (int i = 0; i < image.pointList.Count; i++) { NetObject lineObj = new NetObject(""); List<Vector3> line = image.pointList[i]; for (int j = 0; j < line.Count; j++) { lineObj.addFloat("", line[j].x); lineObj.addFloat("", line[j].y); } img.addNetObject(lineObj); } return img; }