コード例 #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
コード例 #2
0
    private void Start()
    {
        menuBikeColorSelector = MenuBikeColorSelector.instance;
        int count         = transform.parent.parent.GetSiblingIndex();
        var ppc           = new PlayerPrefsController();
        int killsToUnlock = count - ppc.killCount;

        unlockableText.text = $"{killsToUnlock} Takedowns to unlock";
        isUnlocked          = count <= ppc.killCount;
        selectedTooltip     = isUnlocked?tooltipUnlocked:tooltipLocked;
    }