示例#1
0
    private void FillSpriteDictionary()
    {
        seasonalBackgroundSpritePaths = new Dictionary <MonthInfo.Seasons, string>();
        JsonToRestSpriteContainer spriteDataList = this.config.GetRestaurantSpriteData();
        string spritePath = spriteDataList.SpriteLocation;

        MonthInfo.Seasons season = MonthInfo.Seasons.NONE;

        foreach (JsonToRestSprite spriteData in spriteDataList.Sprites)
        {
            switch (spriteData.SpriteName)
            {
            case "Window_Plain":
                season = MonthInfo.Seasons.NONE;
                break;

            case "Window_Spring":
                season = MonthInfo.Seasons.SPRING;
                break;

            case "Window_Summer":
                season = MonthInfo.Seasons.SUMMER;
                break;

            case "Window_Fall":
                season = MonthInfo.Seasons.FALL;
                break;

            case "Window_Winter":
                season = MonthInfo.Seasons.WINTER;
                break;
            }
            seasonalBackgroundSpritePaths.Add(season, spritePath + spriteData.SpriteName);
        }
    }
示例#2
0
 public Month(MonthInfo.Months name, MonthInfo.Seasons season, GameObject calendarPrefab)
 {
     this.name           = name;
     this.season         = season;
     this.calendarPrefab = calendarPrefab;
 }
示例#3
0
 private void SetSprites()
 {
     MonthInfo.Months  month  = this.gameManager.GetMonth();
     MonthInfo.Seasons season = this.monthBuilder.GetMonthSeason(month);
     backgroundWindow.sprite = Resources.Load <Sprite>(seasonalBackgroundSpritePaths[season]);
 }