public new void Awake() { base.Awake(); AudioSource = this.GetComponent <AudioSource>(); Avatar = GetComponentInChildren <AvatarScript>(); SceneRequiresPlayer = false; }
public new void Awake() { SceneRequiresPlayer = false; Avatar = GetComponentInChildren <AvatarScript>(); Trump = GetComponentInChildren <TrumpScript>(); Child = GetComponentInChildren <ChildScript>(); cam = GetComponentInChildren <Camera>(); }
void CreateGameObjects() { if (avatar == null) { Console.WriteLine("Spawning avatar"); avatar = AvatarScript.SpawnAvatar(".\\CustomAvatars\\TemplateFullBody.avatar", true); StartCoroutine(WaitForAvatar()); } }
/// <summary> /// The last collectable was either collected or destroyed /// </summary> /// <param name="sender">The collectable</param> /// <param name="e">Nothin</param> private void CollectablesDone(object sender, System.EventArgs e) { RemoveBombs(); AvatarScript avatar = PlayerScript.Instance.ChangeToAvatar(); avatar.SetAnimation("Idle"); this.Delay(1.5f, () => { avatar.SetAnimation("WalkRight"); float screenRitghtX = 7; float avatarX = avatar.transform.position.x; float distanceToRight = screenRitghtX - avatarX; avatar.GlideX(avatarX, screenRitghtX, distanceToRight * .2f).Then(FadeToBeach); }); }
public new void Awake() { Avatar = GetComponentInChildren <AvatarScript>(); SceneRequiresPlayer = false; }
protected virtual void Start() { _avatar = GameObject.FindObjectOfType<AvatarScript>(); _motor = GameObject.FindObjectOfType<AvatarMotor>(); }
void Start() { _avatar = GameObject.FindObjectOfType<AvatarScript>(); }
/// <summary> /// Awake (before start) /// </summary> public void Awake() { Avatar = GetComponentInChildren <AvatarScript>(true); Avatar.gameObject.layer = this.gameObject.layer; }
/// <summary> /// Awake (before start) /// </summary> public void Awake() { Avatar = GetComponentInChildren <AvatarScript>(true); Avatar.gameObject.layer = this.gameObject.layer; CountdownText = GameObject.Find("CountDownText").GetComponent <TextMeshProUGUI>(); }
private void Awake() { this.Avatar = GetComponent <AvatarScript>(); this.AudioSource = GetComponent <AudioSource>(); }
void Awake() { _avatar = GameObject.FindObjectOfType<AvatarScript>(); _passage = GameObject.FindObjectOfType<FinalPassage>(); }
void Start() { avatarScript = avatarObj.GetComponent <AvatarScript>(); }
public void CompleteLevel(AvatarScript avatar) { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1, LoadSceneMode.Single); }