// 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;
    }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     //Begin SpawnClouds Coroutine
     aux      = AuxManager.instance;
     cam      = aux.GetCamera();
     camWidth = cam.orthographicSize * cam.aspect;
     StartCoroutine(SpawnClouds());
 }
Exemple #3
0
    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
    }
Exemple #4
0
 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>();
 }
Exemple #6
0
    // 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;
        }
    }
Exemple #7
0
 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>();
 }
Exemple #8
0
    // 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;
    }
Exemple #9
0
 // Start is called before the first frame update
 void Start()
 {
     aux       = AuxManager.instance;
     player    = aux.GetPlayer().transform;
     camFollow = aux.GetCamera().GetComponent <CameraFollow>();
 }
Exemple #10
0
 void Start()
 {
     aux = AuxManager.instance;
     cam = aux.GetCamera();
 }
 void Start()
 {
     aux        = AuxManager.instance;
     mainCamera = aux.GetCamera();
     m_icon     = aux.GetIndicatorPool().GetPooledObject().GetComponent <RectTransform>();
 }