Example #1
0
 // Use this for initialization
 void Start()
 {
     //acces the pie spawner game object and get its attached script
     pieSpawner = GameObject.FindGameObjectWithTag("PieSpawner");
     pieScript  = pieSpawner.GetComponent <PieScript> ();
     pieSplat   = gameObject.GetComponent <Animator>();
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        FloatingTextManager.Initialise();
        //find the two spawners to acces scripts
        m_pieSpawner = GameObject.FindGameObjectWithTag("PieSpawner");
        m_pedSpawner = GameObject.FindGameObjectWithTag("PedSpawner");

        m_pieSplatSound = this.GetComponent <AudioSource>();

        //get the script and component references
        m_pieScript         = m_pieSpawner.GetComponent <PieScript>();
        m_gameManagerScript = m_pedSpawner.GetComponent <PieThrowManagerScript>();
        m_sr = gameObject.GetComponent <SpriteRenderer>();
        m_pieSpriteManager = gameObject.GetComponent <PieSpriteChanger> ();

        m_isHit = false;
    }