コード例 #1
0
ファイル: FoxZone.cs プロジェクト: Oisann/TheMazeGame
 void BounceThemBack()
 {
     if (fox != null)
     {
         fox.GetComponent <PickupableObject>().BounceItemBack();
     }
     if (hen != null)
     {
         hen.GetComponent <PickupableObject>().BounceItemBack();
     }
     if (grain != null)
     {
         grain.GetComponent <PickupableObject>().BounceItemBack();
     }
 }
コード例 #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>();
    }