コード例 #1
0
 void Awake()
 {
     coinIndicator = GameObject.FindObjectOfType <CoinIndicator> ();
     sceneManager  = GameObject.FindObjectOfType <SceneManager> ();
     collecting    = false;
     collected     = false;
 }
コード例 #2
0
ファイル: Settings.cs プロジェクト: tristanbrulotte75/sm64vr
    public void UIToggleDisplayCoins()
    {
        StorageManager.data.optionInterfaceDisplayCoins = toggleDisplayCoins.value;

        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if (!player)
        {
            return;
        }

        CoinIndicator coinIndicator = player.GetComponentInChildren <CoinIndicator> ();

        if (coinIndicator)
        {
            coinIndicator.SetPosition();
        }
    }