void Start() { TorchScript = GetComponent <TL_Torch>(); CharacterRigidbody = GetComponent <Rigidbody2D>(); AnimationManagerScript = GetComponent <TL_AnimationManager>(); PlayerSoundManagerScript = GetComponent <TL_PlayerSoundManager>(); }
void Start() { DontDestroyOnLoad(gameObject); CharacterRigidbody = GetComponent <Rigidbody2D>(); EdgeDetectionScript = GetComponent <TL_EdgeDetection>(); AnimationManagerScript = GetComponent <TL_AnimationManager>(); FlipCharacter(1f); }
void Awake() { //Find the player gameobject Player = GameObject.FindGameObjectWithTag("Player"); //Set the starting position StartingPosition = Player.transform.position; //Obtain the respawn script RespawnScript = Player.GetComponent <TL_Respawn>(); //Obtain the animation manager script form the player AnimationManagerScript = Player.GetComponent <TL_AnimationManager>(); }
void Start() { AnimationManagerScript = GetComponent <TL_AnimationManager>(); DontDestroyOnLoad(gameObject); }