Exemplo n.º 1
0
 void BounceThemBack()
 {
     if (fox != null)
     {
         fox.GetComponent <PickupableObject>().BounceItemBack();
     }
     if (hen != null)
     {
         hen.GetComponent <PickupableObject>().BounceItemBack();
     }
     if (grain != null)
     {
         grain.GetComponent <PickupableObject>().BounceItemBack();
     }
 }
Exemplo n.º 2
0
    void Start()
    {
        _fxFoxBackground = _fxFoxBackground.GetComponent <FoxController> ();
        _fxFoxForeground = _fxFoxForeground.GetComponent <FoxController> ();


        dragDistances = Screen.height * 20 / 100; // dragDistance is 20% heigh of the screen

        Canvas.SetActive(false);
        GameOver.SetActive(false);

        AudioSource source_fxFoxBackground = GetComponent <AudioSource>();
        AudioSource source_fxFoxForeground = GetComponent <AudioSource>();
    }