/////////////////////////// MAKE DRAWINGS //////////////////////// #region Make Drawing /// <summary> /// Draw a temporary drawing into a newly created gameobject /// </summary> /// <param name="tData"></param> /// <param name="imagePosition"></param> /// <param name="imageScale"></param> public void DrawTempImageAt(TendresseData tData, Vector3 imagePosition, float imageScale) { GameObject go = (GameObject)Instantiate(DrawingObjectPrefab, imagePosition, Quaternion.identity); TouchDraw touchDraw = go.GetComponent <TouchDraw>(); touchDraw.canDraw = false; //Cant draw in temporaty touch <--- Yes, there is a typo, too lazy to fix. Yes Am Tired. KthxBye. touchDraw.LoadTendresseData(tData, imagePosition, imageScale); tempDrawingList.Add(touchDraw); }
public void Awake() { this.drawZoneContainer = GameObject.Find("StoryDrawZones").transform; // Create and store draw zone GameObject drawZoneObject = (GameObject)GameObject.Instantiate(this.drawingPrefab, Vector3.zero, Quaternion.identity); drawZoneObject.transform.parent = this.drawZoneContainer; this.drawing = drawZoneObject.GetComponent<TouchDraw>(); this.drawing.canDraw = false; // Place draw zone under drawing point this.drawing.transform.position = this.drawingPoint.TransformPoint(this.drawingPoint.rect.center); // Set up sound button this.audioPlayButton.ParentView = this; this.audioPlayButton.Mode = SoundButton.SoundButtonMode.PLAY; }
public void Awake() { this.drawZoneContainer = GameObject.Find("StoryDrawZones").transform; // Create and store draw zone GameObject drawZoneObject = (GameObject)GameObject.Instantiate(this.drawingPrefab, Vector3.zero, Quaternion.identity); drawZoneObject.transform.parent = this.drawZoneContainer; this.drawing = drawZoneObject.GetComponent <TouchDraw>(); this.drawing.canDraw = false; // Place draw zone under drawing point this.drawing.transform.position = this.drawingPoint.TransformPoint(this.drawingPoint.rect.center); // Set up sound button this.audioPlayButton.ParentView = this; this.audioPlayButton.Mode = SoundButton.SoundButtonMode.PLAY; }