public void playAnimation() { soundManager = gameObject.GetComponent<PG_SoundManager>(); animation.Play(); if(soundManager!=null){ soundManager.playInstructionSound(new string[]{PG_Constants._soundclipPath +PG_Constants._rollingShapes}); //Debug.Log("rolling shapes: "+PG_Constants._soundclipPath +PG_Constants._rollingShapes); } //else Debug.Log("soundManager is null"); }
public void playAnimation() { soundManager = gameObject.GetComponent <PG_SoundManager>(); animation.Play(); if (soundManager != null) { soundManager.playInstructionSound(new string[] { PG_Constants._soundclipPath + PG_Constants._rollingShapes }); //Debug.Log("rolling shapes: "+PG_Constants._soundclipPath +PG_Constants._rollingShapes); } //else Debug.Log("soundManager is null"); }
void Start() { GameObject shapesRef = GameObject.FindGameObjectWithTag("pg_shapes_container"); if (shapesRef != null) { soundManager = shapesRef.GetComponent <PG_SoundManager>(); } currentFrame = 0.0f; isAnimating = true; changeTexture = true; ickyState = ickyAnimStates.icky_idle1; ickyPrevState = ickyState; }
void Start() { isAnimating = true; changeTexture = true; ollyState = ollyAnimationStates.olly_idle1; ollyPrevState = ollyState; camera = GameObject.Find("Camera"); gameController = camera.GetComponent <PG_GameController>(); if (shapesRefrence != null) { soundManager = shapesRefrence.GetComponent <PG_SoundManager>(); } }
// 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); }
void Start() { GameObject shapesRef = GameObject.FindGameObjectWithTag("pg_shapes_container"); if(shapesRef!=null) soundManager = shapesRef.GetComponent<PG_SoundManager>(); currentFrame =0.0f; isAnimating = true; changeTexture = true; ickyState =ickyAnimStates.icky_idle1; ickyPrevState=ickyState; }
void Start() { isAnimating = true; changeTexture = true; ollyState = ollyAnimationStates.olly_idle1; ollyPrevState = ollyState; camera = GameObject.Find("Camera"); gameController = camera.GetComponent<PG_GameController>(); if(shapesRefrence!=null) soundManager = shapesRefrence.GetComponent<PG_SoundManager>(); }