Esempio n. 1
0
    void Start()
    {
        manager   = gameObject.GetComponent <mainManager> ();
        uimanager = gameObject.GetComponent <guiManager> ();
        generator = gameObject.GetComponent <enemyGenerator> ();


        if (GameObject.Find("missionCollector") != null)
        {
            logger = GameObject.Find("missionCollector").GetComponent <missionLog> ();
        }
        if (Comers != null)
        {
        }
        Comers           = GameObject.Find("comers").GetComponent <comersScript> ();
        deathmanager     = gameObject.transform.Find("deathController").GetComponent <deathControl> ();
        levelTime        = manager.levelTime;
        manager.isPaused = true;
        uimanager.startl();

        NGUITools.SetActive(points.gameObject, false);



        if (GoogleAnalytics.instance)
        {
            GoogleAnalytics.instance.LogScreen("Cat Game Menu");
        }
    }
Esempio n. 2
0
 void Start()
 {
     manager    = GameObject.Find("Manager").GetComponent <mainManager>();
     controller = GameObject.Find("Manager").GetComponent <gameController>();
     if (GameObject.Find("missionCollector") != null)
     {
         logger = GameObject.Find("missionCollector").GetComponent <missionLog>();
     }
 }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        manager = GameObject.Find("Manager").GetComponent <mainManager>();
        if (GameObject.Find("missionCollector") != null)
        {
            loger = GameObject.Find("missionCollector").GetComponent <missionLog>();
        }

        if (rateMeLabel != null)
        {
            NGUITools.SetActive(rateMeLabel, false);
        }
    }
Esempio n. 4
0
    void Start()
    {
        manager = GameObject.Find("Manager").GetComponent <mainManager>();
        if (GameObject.Find("missionCollector") != null)
        {
            loger = GameObject.Find("missionCollector").GetComponent <missionLog>();
        }
        for (int b = 0; b < 6; b++)
        {
            NGUITools.SetActive(achivsObj[b], false);
        }


        for (int f = 0; f < 6; f++)
        {
            if (PlayerPrefs.HasKey("cat_steep_achiv" + f))
            {
                steep[f] = PlayerPrefs.GetInt("cat_steep_achiv" + f);
            }
        }
        StartCoroutine(achivCheck());
    }
Esempio n. 5
0
 void Start()
 {
     generPos   = transform.Find("generPos");
     manager    = GameObject.Find("Manager").GetComponent <mainManager>();
     controller = GameObject.Find("Manager").GetComponent <gameController>();
 }
Esempio n. 6
0
    void Start()
    {
        startPos  = transform.position.x;
        startPosY = transform.position.y;
        isAlive   = true;

        rope = transform.Find("rope").gameObject;

        if (manager == null)
        {
            manager = GameObject.Find("Manager").GetComponent <mainManager>();
        }

        if (transform.rotation.eulerAngles.y == 0)
        {
            rlDir = true;
            //print ("track");
        }

        if (isGhost)
        {
            num = 2;
            if (manager.soundOn)
            {
                int selSound = 0;
                selSound = Random.Range(0, 2);
                if (selSound == 0)
                {
                    if (ghostSound1 != null)
                    {
                        soundClone = Instantiate(ghostSound1, transform.position, transform.rotation) as GameObject;
                        soundClone.transform.parent = transform;
                    }
                }
                else
                {
                    if (ghostSound2 != null)
                    {
                        soundClone = Instantiate(ghostSound2, transform.position, transform.rotation) as GameObject;
                        soundClone.transform.parent = transform;
                    }
                }
            }


            if (startPos < 0)
            {
                Transform coreGO = null;
                coreGO = transform.parent.parent;

                coreGO.rotation = Quaternion.Euler(new Vector3(0, 0, 0));
                speed           = -speed;
            }
        }

        if (isDog)
        {
            num = 3;

            //transform.rotation = Quaternion.Euler (new Vector3(0,0,0));
            Transform coreGO = null;
            coreGO = transform.parent.parent;

            coreGO.rotation = Quaternion.Euler(new Vector3(0, 0, 0));



            speed = speed * 5;
            if (startPos < 0)
            {
                transform.rotation = Quaternion.Euler(new Vector3(0, 180, 0));
                dogFlag            = true;
            }

            dogTemp = speed;
        }

        if (isBat)
        {
            num = 0;
        }
        if (isOwl)
        {
            speed = speed * 0.75f;
            num   = 1;
        }
    }
Esempio n. 7
0
 void Start()
 {
     manager = GameObject.Find("Manager").GetComponent <mainManager>();
 }