public void SetupIntro() { s_ins = this; if (skipIntro) { IntroDone(); return; } AddIntroEventHandler(); MergeMultiTarget.instance.OnTrackingFound += OnTrackingFound; MergeMultiTarget.instance.OnTrackingLost += OnTrackingLost; audioPlayer = GetComponent <AudioSource> (); if (customReticle != null) { customReticle.SetActive(false); } tutorialModel = tutorialModelRoot.GetComponent <ModelAnimationManager>(); if (LRController != null) { lrg = LRController.GetComponent <LineRendererController>(); } }
private void initializeUserControls() { introComponent = new IntroControl(WM); raceComponent = new RaceControl(WM); alignmentComponent = new AlignmentControl(WM); raceComponent.SubraceChanged += new EventHandler(raceComponent_SubraceChanged); ageComponent = new AgeControl(WM); bodyComponent = new BodyControl(WM); appearanceComponent = new AppearanceControl(WM); appearanceComponent.AppearanceChanged += new EventHandler(appearanceComponent_AppearanceChanged); classComponent = new ClassControl(WM); classComponent.ClassChanged += new EventHandler(classComponent_ClassChanged); classComponent.ClassChoiceChanged += new EventHandler(classComponent_ClassChoiceChanged); backgroundComponent = new BackgroundControl(WM); abilityComponent = new AbilityControl(WM); abilityComponent.AbilityAssigned += new EventHandler(abilityComponent_AbilityAssigned); abilityComponent.AbilityBonusAssigned += new EventHandler(abilityComponent_AbilityBonusAssigned); languageComponent = new LanguageControl(WM); languageComponent.LanguageSelectionChanged += new EventHandler(languageComponent_LanguageSelectionChanged); skillComponent = new SkillControl(WM); skillComponent.SkillChosen += new EventHandler(skillComponent_SkillChosen); equipmentComponent = new EquipmentControl(WM); equipmentComponent.EquipmentSelectionChanged += new EventHandler(equipmentComponent_EquipmentSelectionChanged); spellComponent = new SpellControl(WM); spellComponent.SpellChosen += new EventHandler(spellComponent_SpellChosen); extraRaceChoiceComponent = new ExtraRaceChoiceControl(WM); extraRaceChoiceComponent.ExtraRaceChoiceChanged += new EventHandler(extraRaceChoiceComponent_ExtraRaceChoiceChanged); extraClassChoiceComponent = new ExtraClassChoiceControl(WM); extraClassChoiceComponent.SubcontrolOptionChosen += new EventHandler(extraClassChoiceComponent_SubcontrolOptionChosen); extraSubclassChoiceComponent = new ExtraSubclassChoiceControl(WM); extraSubclassChoiceComponent.SubcontrolOptionChosen += new EventHandler(extraSubclassChoiceComponent_SubcontrolOptionChosen); nameComponent = new NameControl(WM); nameComponent.NameChanged += new EventHandler(nameComponent_NameChanged); storyComponent = new StoryControl(WM); storyComponent.SubcontrolOptionChosen += new EventHandler(storyComponent_SubcontrolOptionChosen); exportComponent = new ExportControl(WM); }
// Use this for initialization void Start() { scenario = new Scenario(); objectif = scenario.getObjectif(); Time.timeScale = 1; scriptIntroControl = this.GetComponent <IntroControl> (); scriptIntroControl.enabled = true; scriptIntroState = plane.GetComponent <IntroState> (); scriptIntroState.enabled = true; //intro script activation state = State.INTRO; scriptPlanePhysics = plane.GetComponent <PlanePhysics> (); scriptPlanePhysics.enabled = false; scriptSlidingBackground = backgrounds.GetComponent <SlidingBackground>(); scriptRandomObject = this.GetComponent <RandomObject> (); scriptRandomObject.enabled = false; scriptFuelControl = GetComponent <FuelControl>(); scriptFuelControl.enabled = true; prevY = scriptPlanePhysics.transform.position.y; isPause = false; guiBestScore.value = PlayerPrefs.GetInt(Constants.MAIN_GAME_HIGH_SCORE); tutoScript = tutoPref.GetComponent <GenericTutoScript>(); if (PlayerPrefs.GetInt(Constants.MAIN_GAME_ALREADY_PLAYED) == 0) { bouttonPause.GetComponent <Image> ().enabled = false; firstPlayTuto(); PlayerPrefs.SetInt(Constants.MAIN_GAME_ALREADY_PLAYED, 1); } else if (!scenario.isFinished()) { displayObjectif(); } }
void Awake() { S = this; }
// Use this for initialization void Start() { scenario = new Scenario (); objectif = scenario.getObjectif(); Time.timeScale = 1; scriptIntroControl = this.GetComponent<IntroControl> (); scriptIntroControl.enabled = true; scriptIntroState = plane.GetComponent<IntroState> (); scriptIntroState.enabled = true; //intro script activation state = State.INTRO; scriptPlanePhysics = plane.GetComponent<PlanePhysics> (); scriptPlanePhysics.enabled = false; scriptSlidingBackground = backgrounds.GetComponent<SlidingBackground>(); scriptRandomObject = this.GetComponent<RandomObject> (); scriptRandomObject.enabled = false; scriptFuelControl = GetComponent<FuelControl>(); scriptFuelControl.enabled = true; prevY = scriptPlanePhysics.transform.position.y; isPause = false; guiBestScore.value = PlayerPrefs.GetInt (Constants.MAIN_GAME_HIGH_SCORE); tutoScript = tutoPref.GetComponent<GenericTutoScript>(); if (PlayerPrefs.GetInt (Constants.MAIN_GAME_ALREADY_PLAYED) == 0) { bouttonPause.GetComponent<Image> ().enabled = false; firstPlayTuto (); PlayerPrefs.SetInt (Constants.MAIN_GAME_ALREADY_PLAYED, 1); } else if (! scenario.isFinished()){ displayObjectif(); } }