// Use this for initialization void Start() { animator = GetComponent<Animator> ();//get tools animator if (drawResizerAnimator == null) { drawResizerAnimator = GameObject.Find ("draw-resizer-background (Drawing Level)").GetComponent<Animator> (); } if (onScreenDrawingComp == null) { onScreenDrawingComp = Camera.main.GetComponent<OnScreenDrawing> (); } }
public OnScreenDrawing onScreenDrawingComp; //OnScreenDrawing component // Use this for initialization void Start() { animator = GetComponent <Animator> (); //get tools animator if (drawResizerAnimator == null) { drawResizerAnimator = GameObject.Find("draw-resizer-background (Drawing Level)").GetComponent <Animator> (); } if (onScreenDrawingComp == null) { onScreenDrawingComp = Camera.main.GetComponent <OnScreenDrawing> (); } }
public GameObject[] Shapes; //drawing shapes // Use this for initialization IEnumerator Start() { if (cam == null) { cam = Camera.main; } if (onScreenDrawingComp == null) { onScreenDrawingComp = cam.GetComponent <OnScreenDrawing> (); } if (menuWindowAnimator == null) { menuWindowAnimator = GameObject.Find("menu-window (Drawing Level)").GetComponent <Animator> (); } if (blakScreenAnimator == null) { blakScreenAnimator = GameObject.Find("black-screen").GetComponent <Animator> (); } if (drawResizerBackgroundAnimator == null) { drawResizerBackgroundAnimator = GameObject.Find("draw-resizer-background (Drawing Level)").GetComponent <Animator> (); } if (toolsAnimator == null) { toolsAnimator = GameObject.Find("Tools").GetComponent <Animator> (); } if (middleCam == null) { middleCam = GameObject.FindGameObjectWithTag("MiddleCam").GetComponent <Camera> (); } screenShotComp = GetComponent <ScreenShot> (); CreateShape(); CheckNextPreviousAlpha(); CheckMusicIcon(SFX.instance.audioSources [0], GameObject.Find("music_on (Drawing Level)")); CheckSoundIcon(SFX.instance.audioSources [1], GameObject.Find("sound_on (Drawing Level)")); yield return(new WaitForSeconds(0.5f)); DrawingColor.isReady = true; yield return(new WaitForSeconds(1.5f)); }
// Use this for initialization IEnumerator Start() { if (cam == null) { cam = Camera.main; } if (onScreenDrawingComp == null) { onScreenDrawingComp = cam.GetComponent<OnScreenDrawing> (); } if (menuWindowAnimator == null) { menuWindowAnimator = GameObject.Find ("menu-window (Drawing Level)").GetComponent<Animator> (); } if (blakScreenAnimator == null) { blakScreenAnimator = GameObject.Find ("black-screen").GetComponent<Animator> (); } if (drawResizerBackgroundAnimator == null) { drawResizerBackgroundAnimator = GameObject.Find ("draw-resizer-background (Drawing Level)").GetComponent<Animator> (); } if (toolsAnimator == null) { toolsAnimator = GameObject.Find ("Tools").GetComponent<Animator> (); } if (middleCam == null) { middleCam = GameObject.FindGameObjectWithTag ("MiddleCam").GetComponent<Camera> (); } screenShotComp = GetComponent<ScreenShot> (); CreateShape (); CheckNextPreviousAlpha (); CheckMusicIcon (SFX.instance.audioSources [0], GameObject.Find ("music_on (Drawing Level)")); CheckSoundIcon (SFX.instance.audioSources [1], GameObject.Find ("sound_on (Drawing Level)")); yield return new WaitForSeconds (0.5f); DrawingColor.isReady = true; yield return new WaitForSeconds (1.5f); }