public void openGallery() { audioControll.playOptionSound1(); PhotoPlugin.getInstance().openGallery(); imageFrom = GALLERY; PhotoPlugin.getInstance().delegatedImage = imageHandle; }
public void openCamera() { audioControll.playOptionSound1(); PhotoPlugin.getInstance().openCamera(); imageFrom = CAMERA; PhotoPlugin.getInstance().delegatedImage = imageHandle; }
public void openGallery() { PhotoPlugin.getInstance().openGallery(); imageFrom = GALLERY; PhotoPlugin.getInstance().delegatedImage = imageHandle; saveImage = false; }
void Start() { SharedObject2 = GameObject.Find("SharedObject2"); v = SharedObject2.GetComponent <SharedVariable2> (); CreateRoomButton.interactable = false; PhotoPlugin.getInstance().delegatedImage = imageHandle; }
// 2 callback functions that will be called in Unity by Android Plugin, // with the width and height of image passed as its input parameters void Camera_Done(string parameter) { PhotoPlugin.getInstance().handleImage(parameter); }
//FB SDK END void Start() { // Handle Image data returned from Plugin PhotoPlugin.getInstance().delegatedImage = imageHandle; if (withChoice == true) { photoIsSelected = true; levelIsSelected = true; sharedObject = GameObject.FindGameObjectsWithTag("SharedObject")[0] as GameObject; v = sharedObject.GetComponent <SharedVariables> (); byte[] data = v.imageData; int w = v.width; int h = v.height; if (data.Length == 0 || w == 0 || h == 0) { SceneManager.LoadSceneAsync("GP_Menu", LoadSceneMode.Single); } else { loadImage(data, w, h); } Button easyButton = GameObject.Find("Easy Button").GetComponent <Button> (); ColorBlock easyColors = easyButton.colors; Button normalButton = GameObject.Find("Normal Button").GetComponent <Button> (); ColorBlock normalColors = normalButton.colors; Button hardButton = GameObject.Find("Hard Button").GetComponent <Button> (); ColorBlock hardColors = hardButton.colors; Color32 levelSelect; if (GameName == "GP") { levelSelect = new Color32(171, 210, 255, 255); } else if (GameName == "JP") { levelSelect = new Color32(223, 255, 193, 255); } else { levelSelect = new Color32(255, 255, 255, 255); } if (v.level == EASY) { easyColors.normalColor = levelSelect; easyButton.colors = easyColors; level = EASY; } else if (v.level == NORMAL) { normalColors.normalColor = levelSelect; normalButton.colors = normalColors; level = NORMAL; } else if (v.level == HARD) { hardColors.normalColor = levelSelect; hardButton.colors = hardColors; level = HARD; } Button camera = GameObject.Find("Camera Button").GetComponent <Button> (); Button gallery = GameObject.Find("Gallery Button").GetComponent <Button> (); Color32 Select; if (GameName == "GP") { Select = new Color32(223, 255, 193, 255); } else if (GameName == "JP") { Select = new Color32(255, 220, 180, 255); } else { Select = new Color32(255, 255, 255, 255); } if (v.imageFrom.Equals("camera")) { imageFrom = CAMERA; camera.GetComponent <Image> ().color = Select; } else if (v.imageFrom.Equals("gallery")) { imageFrom = GALLERY; gallery.GetComponent <Image> ().color = Select; } if (GameName == "GP") { tipsToggle.isOn = v.withTips; } } }
public void openCamera() { PhotoPlugin.getInstance().openCamera(); imageFrom = CAMERA; PhotoPlugin.getInstance().delegatedImage = imageHandle; }