// Use this for initialization void Start() { standingShapeTiltAngle = 5F; referent_shapeWithHint = GameObject.FindGameObjectWithTag("pg_referent_shapeWithHint"); olly = GameObject.Find("pg_olly"); icky = GameObject.FindGameObjectWithTag("pg_icky"); referent_bubble = GameObject.FindGameObjectWithTag("pg_referent_bubble"); referent_shape = GameObject.FindGameObjectWithTag("pg_referent_shape"); referent_hint = GameObject.FindGameObjectWithTag("pg_referent_hint"); camera = GameObject.Find("Camera"); ollyParent = GameObject.Find("OllyReferentContainer"); shapeShadow = GameObject.Find("shape_shadow"); // ---- Get game controller script on Main Camera gameController = camera.GetComponent <PG_GameController>(); if (olly != null) { ollyAnimationsSR = olly.GetComponent <PG_OllyAnimations>(); } camera = GameObject.Find("Camera"); gameController = camera.GetComponent <PG_GameController>(); }
// Use this for initialization void Start() { pgDataManager = new JW_DataManager (AGGameIndex.k_ShapePond,(int)SkillID.skill_1,plist.text); // Here 1 is the game Index, O is the first skill in available skills //----------- Scale Factor float screenResolution=Screen.currentResolution.width; scaleFactor=screenResolution/PG_Constants.PG_SCREEN_WIDTH; //-------- Refrences of the Objects controlled by GameController GameObject shapesRef = GameObject.FindGameObjectWithTag("pg_shapes_container"); GameObject islandRef = GameObject.FindGameObjectWithTag("pg_island"); olly = GameObject.FindGameObjectWithTag("pg_olly"); icky = GameObject.FindGameObjectWithTag("pg_icky"); referent_bubble = GameObject.FindGameObjectWithTag("pg_referent_bubble"); referent_shape = GameObject.FindGameObjectWithTag("pg_referent_shape"); referent_hint = GameObject.FindGameObjectWithTag("pg_referent_hint"); referent_shapeWithHint = GameObject.FindGameObjectWithTag("pg_referent_shapeWithHint"); background_object = GameObject.Find("Backgrounds"); land = GameObject.Find("Land"); olly_referent_Container = GameObject.Find("OllyReferentContainer"); cross_tick_sign = GameObject.Find("cross_tick_sign"); // --------- Initialize script refrences if(shapesRef!=null) shapesControllerSR = shapesRef.GetComponent<PG_ShapesController>(); if(shapesRef!=null) soundManager = shapesRef.GetComponent<PG_SoundManager>(); if(islandRef!=null) islandControllerSR = islandRef.GetComponent<PG_IslandController>(); if(shapesRef!=null) shapeContainerStatControllerSR = shapesRef.GetComponent<PG_ShapeContainerStatController>(); if(olly_referent_Container!=null) ollyReferentControllerSR = olly_referent_Container.GetComponent<PG_OllyController>(); //else Debug.Log("ollyReferentControllerSR is NULL!"); if(olly!=null) ollyAnimationsSR = olly.GetComponent<PG_OllyAnimations>(); if(icky!=null) ickyControllerSR = icky.GetComponent<PG_IckyController>(); if(icky!=null) ickyAnimationsSR = icky.GetComponent<PG_IckyAnimations>(); if(referent_bubble!=null) referentBubbleControllerSR = referent_bubble.GetComponent<PG_ReferentBubble_Controller>(); if(referent_shape!=null) referentShapeControllerSR = referent_shape.GetComponent<PG_ReferentShape_Controller>(); if(referent_hint!=null) referentHintControllerSR = referent_hint.GetComponent<PG_Referent_ShapeHint>(); if(background_object!=null) backgroundControllerSR = background_object.GetComponent<PG_BackgroundController>(); if(land!=null) landControllerSR = land.GetComponent<PG_LandController>(); //else Debug.Log("Land Null"); // ----- loadLevel(); cross_tick_sign.transform.renderer.enabled=false; enableTouches(); // ----- Repeat question if user didn't played for 10 sec // InvokeRepeating("playQuestionInstructionVO",6, 10F); }
// Use this for initialization void Start() { pgDataManager = new JW_DataManager(AGGameIndex.k_ShapePond, (int)SkillID.skill_1, plist.text); // Here 1 is the game Index, O is the first skill in available skills //----------- Scale Factor float screenResolution = Screen.currentResolution.width; scaleFactor = screenResolution / PG_Constants.PG_SCREEN_WIDTH; //-------- Refrences of the Objects controlled by GameController GameObject shapesRef = GameObject.FindGameObjectWithTag("pg_shapes_container"); GameObject islandRef = GameObject.FindGameObjectWithTag("pg_island"); olly = GameObject.FindGameObjectWithTag("pg_olly"); icky = GameObject.FindGameObjectWithTag("pg_icky"); referent_bubble = GameObject.FindGameObjectWithTag("pg_referent_bubble"); referent_shape = GameObject.FindGameObjectWithTag("pg_referent_shape"); referent_hint = GameObject.FindGameObjectWithTag("pg_referent_hint"); referent_shapeWithHint = GameObject.FindGameObjectWithTag("pg_referent_shapeWithHint"); background_object = GameObject.Find("Backgrounds"); land = GameObject.Find("Land"); olly_referent_Container = GameObject.Find("OllyReferentContainer"); cross_tick_sign = GameObject.Find("cross_tick_sign"); // --------- Initialize script refrences if (shapesRef != null) { shapesControllerSR = shapesRef.GetComponent <PG_ShapesController>(); } if (shapesRef != null) { soundManager = shapesRef.GetComponent <PG_SoundManager>(); } if (islandRef != null) { islandControllerSR = islandRef.GetComponent <PG_IslandController>(); } if (shapesRef != null) { shapeContainerStatControllerSR = shapesRef.GetComponent <PG_ShapeContainerStatController>(); } if (olly_referent_Container != null) { ollyReferentControllerSR = olly_referent_Container.GetComponent <PG_OllyController>(); } //else Debug.Log("ollyReferentControllerSR is NULL!"); if (olly != null) { ollyAnimationsSR = olly.GetComponent <PG_OllyAnimations>(); } if (icky != null) { ickyControllerSR = icky.GetComponent <PG_IckyController>(); } if (icky != null) { ickyAnimationsSR = icky.GetComponent <PG_IckyAnimations>(); } if (referent_bubble != null) { referentBubbleControllerSR = referent_bubble.GetComponent <PG_ReferentBubble_Controller>(); } if (referent_shape != null) { referentShapeControllerSR = referent_shape.GetComponent <PG_ReferentShape_Controller>(); } if (referent_hint != null) { referentHintControllerSR = referent_hint.GetComponent <PG_Referent_ShapeHint>(); } if (background_object != null) { backgroundControllerSR = background_object.GetComponent <PG_BackgroundController>(); } if (land != null) { landControllerSR = land.GetComponent <PG_LandController>(); } //else Debug.Log("Land Null"); // ----- loadLevel(); cross_tick_sign.transform.renderer.enabled = false; enableTouches(); // ----- Repeat question if user didn't played for 10 sec // InvokeRepeating("playQuestionInstructionVO",6, 10F); }
// Use this for initialization void Start() { standingShapeTiltAngle = 5F; referent_shapeWithHint = GameObject.FindGameObjectWithTag("pg_referent_shapeWithHint"); olly = GameObject.Find("pg_olly"); icky = GameObject.FindGameObjectWithTag("pg_icky"); referent_bubble = GameObject.FindGameObjectWithTag("pg_referent_bubble"); referent_shape = GameObject.FindGameObjectWithTag("pg_referent_shape"); referent_hint = GameObject.FindGameObjectWithTag("pg_referent_hint"); camera = GameObject.Find("Camera"); ollyParent = GameObject.Find("OllyReferentContainer"); shapeShadow = GameObject.Find("shape_shadow"); // ---- Get game controller script on Main Camera gameController = camera.GetComponent<PG_GameController>(); if(olly!=null) ollyAnimationsSR = olly.GetComponent<PG_OllyAnimations>(); camera = GameObject.Find("Camera"); gameController = camera.GetComponent<PG_GameController>(); }