// Use this for initialization void Start() { player = GameObject.Find("Player").GetComponent<ControllerScript>(); target = GameObject.Find("Player").transform; }
void Awake() { maxSpeed = 5; airSpeed = 6; jumpSpeed = 13f; curCamera = Camera.main; isDead = false; FacingRight = true; isPulling = false; cont = GetComponent<ControllerScript>(); Physics.IgnoreLayerCollision(0, 8, true); curCamera.cullingMask = 1 | 1 << 2; curCamera.orthographicSize = 3.61f; whatToRotate = 1 << 0; whatIsGround = 1 << 0 | 1 << 2; respawns = new LinkedList<Transform>(); rend = GetComponent<SpriteRenderer>(); curNormal = Vector3.up; iniRot = transform.rotation; respawnPoint = new GameObject(); rigidBody = GetComponent<Rigidbody2D>(); GroundCheck = transform.Find("GroundCheck"); pullCheck = transform.Find("PullCheck"); Anim = GetComponent<Animator>(); UI = GameObject.Find("FlipUI"); }