void Start() { cosmonaut = transform.Find("cosmonaut").transform; actionScript = transform.GetComponent <ActionScript>(); history = new List <HistoryElement>(); startPosition = transform.position; rb = GetComponent <Rigidbody2D>(); checkGrounded = GetComponentInChildren <CheckGroundedScript>(); checkCollidersScript = GetComponentInChildren <CheckCollidersScript>(); remPoint = GameObject.FindGameObjectWithTag("RememberPoint").GetComponent <rememberPointScript>(); animator = GetComponentInChildren <Animator>(); }
// Start is called before the first frame update void Start() { actionScript = transform.GetComponent <ActionScript>(); iteration = 0; if (history == null) { history = new List <HistoryElement>(); } checkCollidersScript = GetComponentInChildren <CheckCollidersScript>(); cosmonaut = transform.Find("cosmonaut").transform; camera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraScript>(); animator = GetComponentInChildren <Animator>(); }