コード例 #1
0
ファイル: ControlCG.cs プロジェクト: Hengle/AdvSystemV3
        public void InitializeByParams(object[] param)
        {
            CommandParam data = param[0] as CommandParam;

            AdvKeyContent bgKeys = AdvKeyContent.GetCurrentInstance();

            if (string.Equals(data.command, "CgOff", System.StringComparison.OrdinalIgnoreCase))
            {
                display = BackgroundDisplayType.HideAll;
                return;
            }
            if (bgKeys != null)
            {
                spriteCG = bgKeys.GetDiceCGByKey(data.image);
                if (spriteCG == null)
                {
                    if (!string.IsNullOrEmpty(data.image))
                    {
                        AdvUtility.LogWarning("找不到CG檔:" + data.image + " , 於 行數 " + (this.itemId - 3));
                    }
                }
                else
                {
                    atlasCG = spriteCG.AtlasAsset;
                }
            }
        }
コード例 #2
0
        public void InitializeByParams(object[] param)
        {
            CommandParam data = param[0] as CommandParam;

            AdvKeyContent bgKeys = AdvKeyContent.GetCurrentInstance();

            if (bgKeys != null)
            {
                spriteBackground = bgKeys.GetBackgroundByKey(data.image);
                if (spriteBackground == null && !string.IsNullOrEmpty(data.image))
                {
                    AdvUtility.LogWarning("找不到BG檔:" + data.image + " , 於 行數 " + (this.itemId - 3));
                }
            }
            if (data.command == "BgOff")
            {
                display = BackgroundDisplayType.HideAll;
            }
        }