Beispiel #1
0
    // Update background in use and apply the changes to the play page.
    public void UpdateBackgroundInUse(BackgroundList.Background targetBackground)
    {
        backgroundInUseName = targetBackground.Name;

        foreach (Transform background in _backgroundImages.transform)
        {
            background.gameObject.GetComponent <SpriteRenderer>().sprite = targetBackground.ImageSprite;
        }
    }
Beispiel #2
0
 // Check if the user owns a specific background.
 // Return true if the user owns it; Otherwise return false.
 public bool CheckBackgroundOwnership(BackgroundList.Background background)
 {
     return(backgroundNameToOwnership[(int)background.Name] == Ownership.Owned);
 }
Beispiel #3
0
 private void SwitchToTargetBackground(BackgroundList.Background targetBackground)
 {
     GameDataController.GetGameData().UpdateBackgroundInUse(targetBackground);
     SetBackgroundUsageStatus();
 }