コード例 #1
0
        public bool CheckType(AdvGraphicObjectType type)
        {
            if (LastResource == null)
            {
                return(false);
            }
            switch (type)
            {
            case AdvGraphicObjectType.Character:
            {
                AdvCharacterSettingData settingData = LastResource.SettingData as AdvCharacterSettingData;
                return(settingData != null);
            }

            case AdvGraphicObjectType.Bg:
            {
                AdvTextureSettingData settingData = LastResource.SettingData as AdvTextureSettingData;
                if (settingData == null)
                {
                    return(false);
                }
                return(settingData.TextureType == AdvTextureSettingData.Type.Bg || settingData.TextureType == AdvTextureSettingData.Type.Sprite);
            }

            default:
            case AdvGraphicObjectType.Sprite:
            {
                AdvTextureSettingData settingData = LastResource.SettingData as AdvTextureSettingData;
                if (settingData == null)
                {
                    return(false);
                }
                return(settingData.TextureType == AdvTextureSettingData.Type.Sprite);
            }
            }
        }
コード例 #2
0
 /// <summary>
 /// テクスチャデータを追加
 /// </summary>
 /// <param name="data">テクスチャデータ</param>
 public void AddTextureData(AdvTextureSettingData data)
 {
     list.Add(data);
 }