// Use this for initialization void Start() { tearsContainer = this.transform.Find ("TearsContainer"); tearsContainer.active = false; flowersToThrow = PlayerPrefs.GetInt(GlobalSaveVars.HIGHSCOREVALUE, 0); flowerThrowPoint = this.transform.Find("FlowerThrowPoint"); textBox = this.GetComponentInChildren<TextBox>(); TextMesh textMeshWithReplacableContent = textBox.transform.Find("TextReplace").GetComponent<TextMesh>(); string textBoxText = textMeshWithReplacableContent.text; Debug.Log (textBoxText); Debug.Log (textMeshWithReplacableContent); textMeshWithReplacableContent.text = textBoxText.Replace ("{R}", flowersToThrow+""); textBox.Initialize(); textBox.AddEventListener(this.gameObject); textBox.active = false; talkingAnimation.Hide (); talking = this.GetComponentInChildren<PlayerTalking>(); SceneUtils.FindObjectOf<ExitHandler>().AddEventListener(this.gameObject); }
public override void Awake() { this.sadMouth = this.transform.Find("SadMouth"); this.sadMouth.active = false; this.lips = this.transform.Find("Lips").GetComponent <Animation2D>(); this.lips.active = false; this.tearsContainer = this.transform.Find("Head/TearsContainer"); this.tearsContainer.active = false; this.pickedUpEyesPosition = this.transform.Find("Head/PickupEyesPosition"); this.animationController = this.GetComponent <AnimationController>(); playerTalking = this.GetComponentInChildren <PlayerTalking>(); }
public virtual void Awake() { talking = this.GetComponentInChildren <PlayerTalking>(); originalMoveForce = this.moveForce; tearsContainer = this.transform.Find("Head/TearsContainer"); this.standEyesPosition = this.transform.Find("Head/StandEyesPosition"); this.slideEyesPosition = this.transform.Find("Head/SlideEyesPosition"); this.pickedUpEyesPosition = this.transform.Find("Head/PickupEyesPosition"); this.stopEyesPosition = this.transform.Find("Head/StopEyesPosition"); this.animationController = this.GetComponent <AnimationController>(); this.tearsContainer.position = standEyesPosition.position; groundCheck = transform.Find("groundCheck"); gun = this.transform.Find("Items/Gun"); this.jumpSound = this.transform.Find("Sounds/JumpSound").GetComponent <AudioSource>(); this.onHitSound = this.transform.Find("Sounds/OnHitSound").GetComponent <AudioSource>(); this.shootSound = this.transform.Find("Sounds/ShootSound").GetComponent <AudioSource>(); this.swingSound = this.transform.Find("Sounds/SwingSound").GetComponent <AudioSource>(); this.stopSound = this.transform.Find("Sounds/StopSound").GetComponent <AudioSource>(); this.slideSound = this.transform.Find("Sounds/SlideSound").GetComponent <AudioSource>(); this.explosionSound = this.transform.Find("Sounds/ExplosionSound").GetComponentInChildren <AudioSource>(); this.lips = this.transform.Find("Lips").GetComponent <Animation2D>(); this.lips.active = false; playerItemComponent = this.GetComponent <PlayerItemComponent>(); this.AddEventListener(playerItemComponent.gameObject); boxCarryComponent = this.GetComponent <BoxCarryComponent>(); ghost = this.GetComponentInChildren <MaxGhost>(); ghost.AddEventListener(this.gameObject); ghost.active = false; }
// Use this for initialization void Start() { talking = this.GetComponentInChildren <PlayerTalking>(); textBoxManager = SceneUtils.FindObjectOf <TextBoxManager>(); textBoxManager.AddEventListener(this.gameObject); }