// Use this for initialization void Start() { aux = AuxManager.instance; cam = aux.GetCamera(); SpriteRenderer sRenderer = GetComponent <SpriteRenderer>(); spriteWidth = sRenderer.sprite.bounds.size.x * transform.localScale.x; }
// Use this for initialization void Start() { //Begin SpawnClouds Coroutine aux = AuxManager.instance; cam = aux.GetCamera(); camWidth = cam.orthographicSize * cam.aspect; StartCoroutine(SpawnClouds()); }
void Start() { aux = AuxManager.instance; cam = aux.GetCamera(); sRenderer = GetComponent <SpriteRenderer>(); //Set camWidth. Will be used later to check whether or not cloud is off screen. camWidth = cam.orthographicSize * cam.aspect; //Set Cloud Movement Speed, and Position to random values within range defined above }
void Start() { aux = AuxManager.instance; EM = EffectsManager.instance; player = aux.GetPlayer().transform; sRenderer = GetComponent <SpriteRenderer>(); rb = GetComponent <Rigidbody2D>(); camFollow = aux.GetCamera().GetComponent <CameraFollow>(); ChangeColor(); alreadyStarted = true; }
private void Start() { aux = AuxManager.instance; GM = GameManager.instance; EM = EffectsManager.instance; rb = GetComponent <Rigidbody2D>(); grabbableObjectsList = new List <GameObject>(); grabObjectIndicator = aux.GetGrabObjectIndicator(); line = GetComponent <LineRenderer>(); camFollow = aux.GetCamera().GetComponent <CameraFollow>(); throwHook = GetComponent <ThrowHook>(); hinge = GetComponent <HingeJoint2D>(); disJoint = GetComponent <DistanceJoint2D>(); }
// Use this for initialization void Start() { aux = AuxManager.instance; cam = aux.GetCamera().transform; // store previous frame previousCamPos = cam.position; //declares the length of the array parallaxScales = new float[backgrounds.Length]; //assigning coresponding parallaxScales for (int i = 0; i < backgrounds.Length; i++) { parallaxScales[i] = backgrounds[i].position.z * -1; } }
void Start() { GM = GameManager.instance; aux = AuxManager.instance; EM = EffectsManager.instance; PM = PlayerManager.instance; cam = aux.GetCamera(); player = aux.GetPlayer(); playerThrowHook = player.GetComponent <ThrowHook>(); lastNode = gameObject; nodePool = aux.GetNodePool(); nodeList = new List <GameObject>(); nodeList.Add(transform.gameObject); line = GetComponent <LineRenderer>(); camFollow = cam.GetComponent <CameraFollow>(); rb = GetComponent <Rigidbody2D>(); //edgeCol = GetComponent<EdgeCollider2D>(); }
// Use this for initialization void Start() { aux = AuxManager.instance; cam = aux.GetCamera().transform; lastCameraX = cam.transform.position.x; layers = new Transform[transform.childCount]; for (int i = 0; i < transform.childCount; i++) { layers[i] = transform.GetChild(i); if (randomBackground) { ChangeBackground(i); } } leftIndex = 0; rightIndex = layers.Length - 1; backgroundSize = layers[0].GetComponent <SpriteRenderer>().sprite.bounds.size.x - offsetBackground; }
// Start is called before the first frame update void Start() { aux = AuxManager.instance; player = aux.GetPlayer().transform; camFollow = aux.GetCamera().GetComponent <CameraFollow>(); }
void Start() { aux = AuxManager.instance; cam = aux.GetCamera(); }
void Start() { aux = AuxManager.instance; mainCamera = aux.GetCamera(); m_icon = aux.GetIndicatorPool().GetPooledObject().GetComponent <RectTransform>(); }