当前位置: 首页>>代码示例>>C#>>正文


C# Maid类代码示例

本文整理汇总了C#中Maid的典型用法代码示例。如果您正苦于以下问题:C# Maid类的具体用法?C# Maid怎么用?C# Maid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Maid类属于命名空间,在下文中一共展示了Maid类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateMaid

        /// <summary>
        /// メイドを更新する.
        /// 名前が未指定の場合は、statusのlast_nameとfirst_nameから生成する.
        /// 
        /// </summary>
        /// <param name="maid0">メイド</param>
        /// <param name="name">メイドの名前</param>
        /// <param name="act"></param>
        /// <returns>別のメイドに変更された場合、trueを返す</returns>
        public bool UpdateMaid(Maid maid0, string name, Action act) 
        {
            if (maid0 == null) {
                // メイドリストから最初に有効なメイドを取得
                int count = GameMain.Instance.CharacterMgr.GetMaidCount();
                for (int i=0; i< count; i++) {
                    Maid m = GameMain.Instance.CharacterMgr.GetMaid(i);
                    if (m != null && m.enabled) {
                        maid0 = m;
                        break;
                    }
                }            
            }
            if (currentMaid == maid0) return false;
            currentMaid = maid0;
            if (currentMaid != null) {
                MaidName = name?? currentMaid.Param.status.last_name + " " + currentMaid.Param.status.first_name;

                isOfficial = checkOfficial(currentMaid);
            } else {
                MaidName = "(not selected)";
            }
            LogUtil.Debug("maid changed.", MaidName);

            act();
            return true;
        }
开发者ID:trzr,项目名称:CM3D2.AlwaysColorChangeEx.Plugin,代码行数:36,代码来源:MaidHolder.cs

示例2: UpdateTex

        public bool UpdateTex(Maid maid, Material[] slotMaterials, EditTarget texEdit) {
            // material 抽出 => texture 抽出
            if (slotMaterials.Length <=  texEdit.matNo) return false;
            Material mat = slotMaterials[texEdit.matNo];

            return UpdateTex(maid, mat, texEdit);
        }
开发者ID:trzr,项目名称:CM3D2.AlwaysColorChangeEx.Plugin,代码行数:7,代码来源:TextureModifier.cs

示例3: Update

        public void Update(Maid maid, Dictionary<string, List<Material>> slotMaterials,
            List<Texture2D> textures, EditTarget texEdit ) {

            originalTexCache.Refresh(textures.ToArray());

            FilterTexture(slotMaterials, textures, maid, texEdit);
        }
开发者ID:trzr,项目名称:CM3D2.AlwaysColorChangeEx.Plugin,代码行数:7,代码来源:TextureModifier.cs

示例4: SetClassLevel

 private void SetClassLevel(Maid maid, string classDataFieldName, int classID, int level)
 {
     FieldInfo classDataField = maid.Param.status_.GetType().GetField(classDataFieldName);
     object classData =
         classDataField.FieldType.GetMethod("GetValue", new[] {typeof(int)})
                       .Invoke(classDataField.GetValue(maid.Param.status_), new[] {(object) classID});
     ((SimpleExperienceSystem) classData.GetType().GetField("exp_system").GetValue(classData)).SetLevel(level);
 }
开发者ID:denikson,项目名称:CM3D2.MaidFiddler,代码行数:8,代码来源:MaidFiddlerGUI.Cheats.cs

示例5: ProcGUI

 public void ProcGUI(Maid maid, string slotName, Material material, string propName, float margin, float fontSize, float itemHeight)
 {
     FilterParam fp = Get(maid, slotName, material, propName);
     if (fp != null)
     {
         fp.ProcGUI(margin, fontSize, itemHeight);
     }
 }
开发者ID:neguse11,项目名称:CM3D2.AlwaysColorChange.Plugin,代码行数:8,代码来源:TextureModifier.cs

示例6: SetClassIsHave

 private void SetClassIsHave(Maid maid, string classDataFieldName, int classID, bool value)
 {
     FieldInfo classDataField = maid.Param.status_.GetType().GetField(classDataFieldName);
     object classData =
         classDataField.FieldType.GetMethod("GetValue", new[] {typeof(int)})
                       .Invoke(classDataField.GetValue(maid.Param.status_), new[] {(object) classID});
     classData.GetType().GetField("is_have").SetValue(classData, value);
 }
开发者ID:denikson,项目名称:CM3D2.MaidFiddler,代码行数:8,代码来源:MaidFiddlerGUI.Cheats.cs

示例7: MaidCompareCreateTime

 public static int MaidCompareCreateTime(Maid x, Maid y)
 {
     int result;
     if (x.Param.status.create_time_num < y.Param.status.create_time_num)
         result = -1;
     else
         result = x.Param.status.create_time_num == y.Param.status.create_time_num ? 0 : 1;
     return result;
 }
开发者ID:MrSwiss,项目名称:CM3D2.MaidFiddler,代码行数:9,代码来源:MaidSortFix.cs

示例8: ProcGUI

        public void ProcGUI(Maid maid, string slotName, Material material, string propName) {
            // material 抽出 => texture 抽出
            var tex2d = material.GetTexture(propName) as Texture2D;
            if (tex2d == null || string.IsNullOrEmpty(tex2d.name)) return ;

            var key = CreateKey(maid.Param.status.guid, slotName, material.name, tex2d.name);
            FilterParam fp = filterParams.GetOrAdd(key.ToString());
            fp.ProcGUI(tex2d);
        }
开发者ID:trzr,项目名称:CM3D2.AlwaysColorChangeEx.Plugin,代码行数:9,代码来源:TextureModifier.cs

示例9: Get

 /// <summary>
 /// 拡張セーブデータ内の設定を得る(文字列)
 /// <para>指定した設定が存在しない場合はdefaultValueを返す</para>
 /// <seealso cref="GetBool"/>
 /// <seealso cref="GetInt"/>
 /// <seealso cref="GetFloat"/>
 /// </summary>
 /// <param name="maid">メイドインスタンス</param>
 /// <param name="pluginName">プラグイン名("CM3D2.Test.Plugin"など)</param>
 /// <param name="propName">プロパティ名</param>
 /// <param name="defaultValue">プロパティが存在しない場合に返すデフォルト値</param>
 /// <returns>設定文字列</returns>
 public static string Get(Maid maid, string pluginName, string propName, string defaultValue)
 {
     if (maid == null || pluginName == null || propName == null)
     {
         return defaultValue;
     }
     if (!Contains(maid))
     {
         SetMaid(maid);
     }
     return PluginSettings.Get(maid.Param.status.guid, pluginName, propName, defaultValue);
 }
开发者ID:yknD-CM3D2,项目名称:cm3d2_plugins_okiba,代码行数:24,代码来源:ExSaveData.cs

示例10: LoadCameraSettings

        void LoadCameraSettings(Maid maid)
        {
            if (maid == null || !maid.Visible)
            {
                return;
            }

            bool autoCam = ExSaveData.GetBool(maid, PluginName, "AutoCameraInitialValue", true);
            if (autoCam)
            {
                return;
            }

            float cameraPosX = ExSaveData.GetFloat(maid, PluginName, "CameraPos.x", float.NaN);
            float cameraPosY = ExSaveData.GetFloat(maid, PluginName, "CameraPos.y", float.NaN);
            float cameraPosZ = ExSaveData.GetFloat(maid, PluginName, "CameraPos.z", float.NaN);
            float cameraTargetPosX = ExSaveData.GetFloat(maid, PluginName, "CameraTargetPos.x", float.NaN);
            float cameraTargetPosY = ExSaveData.GetFloat(maid, PluginName, "CameraTargetPos.y", float.NaN);
            float cameraTargetPosZ = ExSaveData.GetFloat(maid, PluginName, "CameraTargetPos.z", float.NaN);
            float cameraDistance = ExSaveData.GetFloat(maid, PluginName, "CameraDistance", float.NaN);
            float cameraRotatationX = ExSaveData.GetFloat(maid, PluginName, "CameraRotation.x", float.NaN);
            float cameraRotatationY = ExSaveData.GetFloat(maid, PluginName, "CameraRotation.y", float.NaN);
            float cameraRotatationZ = ExSaveData.GetFloat(maid, PluginName, "CameraRotation.z", float.NaN);
            float cameraRotatationW = ExSaveData.GetFloat(maid, PluginName, "CameraRotation.w", float.NaN);
            float cameraFov = ExSaveData.GetFloat(maid, PluginName, "CameraFov", float.NaN);

            if (!float.IsNaN(cameraRotatationX) && !float.IsNaN(cameraRotatationY) && !float.IsNaN(cameraRotatationZ) && !float.IsNaN(cameraRotatationW))
            {
                Camera.main.gameObject.transform.rotation = new Quaternion(cameraRotatationX, cameraRotatationY, cameraRotatationZ, cameraRotatationW);
            }

            if (!float.IsNaN(cameraPosX) && !float.IsNaN(cameraPosY) && !float.IsNaN(cameraPosZ))
            {
                mainCamera.SetPos(new Vector3(cameraPosX, cameraPosY, cameraPosZ));
            }

            if (!float.IsNaN(cameraTargetPosX) && !float.IsNaN(cameraTargetPosY) && !float.IsNaN(cameraTargetPosZ))
            {
                mainCamera.SetTargetPos(new Vector3(cameraTargetPosX, cameraTargetPosY, cameraTargetPosZ), true);
            }

            if (!float.IsNaN(cameraDistance))
            {
                mainCamera.SetDistance(cameraDistance, true);
            }
            if (!float.IsNaN(cameraFov))
            {
                Camera.main.fieldOfView = cameraFov;
            }
        }
开发者ID:nnnna,项目名称:cm3d2_plugins_okiba,代码行数:50,代码来源:PersonalizedEditSceneSettingsPlugin.cs

示例11: Update

        public void Update(
            Maid maid,
            Dictionary<string, List<Material>> slotMaterials,
            List<Texture2D> textures,
            string slotName, int materialIndex, string propName
        )
        {
            originalTextureCache.Refresh(textures.ToArray());

            // マウスボタンが離されたタイミングでフィルターを適用する
            if (Input.GetMouseButtonUp(0))
            {
                FilterTexture(slotMaterials, textures, maid, slotName, materialIndex, propName);
            }
        }
开发者ID:neguse11,项目名称:CM3D2.AlwaysColorChange.Plugin,代码行数:15,代码来源:TextureModifier.cs

示例12: GetKey

 private string GetKey(Maid maid, string slotName, Material material, string propName)
 {
     if (maid == null || material == null || string.IsNullOrEmpty(propName))
     {
         return null;
     }
     Texture2D tex2d = material.GetTexture(propName) as Texture2D;
     if (tex2d == null || string.IsNullOrEmpty(tex2d.name))
     {
         return null;
     }
     return string.Format("{0}/{1}/{2}/{3}"
                          , maid.Param.status.guid
                          , slotName
                          , material.name
                          , tex2d.name);
 }
开发者ID:neguse11,项目名称:CM3D2.AlwaysColorChange.Plugin,代码行数:17,代码来源:TextureModifier.cs

示例13: TouchableMaid

 /// <summary>
 /// KHông thể tin nổi là đóng này được dùng với update
 /// </summary>
 /// <param name="maid"></param>
 public TouchableMaid(Maid maid)
 {
     this._maid = maid;
     try
     {
         this._personal = (Personality)Enum.Parse(typeof(Personality), this._maid.Param.status.personal.ToString());
     }
     catch
     {
         this._personal = Personality.Other;
     }
     this._persistPoseSeconds = -1;
     this._touchTargets.Add(new TouchTarget(this._maid, "target_mune", new Vector3(0.1f, 0.1f, 0.1f), "_IK_muneR", null));
     this._touchTargets.Add(new TouchTarget(this._maid, "target_mune", new Vector3(0.1f, 0.1f, 0.1f), "_IK_muneL", null));
     this._touchTargets.Add(new TouchTarget(this._maid, "target_hip", new Vector3(0.12f, 0.12f, 0.12f), "_IK_hipL", "Hip_L"));
     this._touchTargets.Add(new TouchTarget(this._maid, "target_hip", new Vector3(0.12f, 0.12f, 0.12f), "_IK_hipR", "Hip_R"));
     this._touchTargets.Add(new TouchTarget(this._maid, "target_vagina", new Vector3(0.08f, 0.08f, 0.08f), "Bip01 Pelvis", null));
 }
开发者ID:chisanu,项目名称:CM3D2.Chisanu.plugin,代码行数:22,代码来源:TouchableMaid.cs

示例14: Set

 /// <summary>
 /// 拡張セーブデータへ設定を書き込む
 /// <seealso cref="SetBool"/>
 /// <seealso cref="SetInt"/>
 /// <seealso cref="SetFloat"/>
 /// </summary>
 /// <param name="maid">メイドインスタンス</param>
 /// <param name="pluginName">プラグイン名("CM3D2.Test.Plugin"など)</param>
 /// <param name="propName">プロパティ名</param>
 /// <param name="value">書き込む値</param>
 /// <param name="overwrite">trueなら常に上書き。falseなら設定が存在する場合は書き込みを行わない</param>
 /// <returns>true:書き込み成功。false:失敗</returns>
 public static bool Set(Maid maid, string pluginName, string propName, string value, bool overwrite)
 {
     if (maid == null || pluginName == null || propName == null)
     {
         return false;
     }
     if (!Contains(maid))
     {
         SetMaid(maid);
     }
     if (!overwrite)
     {
         if (Contains(maid, pluginName, propName))
         {
             return false;
         }
     }
     return PluginSettings.Set(maid.Param.status.guid, pluginName, propName, value);
 }
开发者ID:yknD-CM3D2,项目名称:cm3d2_plugins_okiba,代码行数:31,代码来源:ExSaveData.cs

示例15: MaidInfo

            public MaidInfo(Maid maid, MaidFiddlerGUI gui)
            {
                Debugger.WriteLine("Creating new MaidInfo");
                this.gui = gui;
                forceUpdateNightWorks = new Dictionary<int, bool>();
                Maid = maid;
                ValueLocks = new Dictionary<MaidChangeType, bool>();
                EnumHelper.MaidChangeTypes.ForEach(t => ValueLocks.Add(t, false));
                TempUnlocks = new Dictionary<MaidChangeType, bool>();
                EnumHelper.MaidChangeTypes.ForEach(t => TempUnlocks.Add(t, false));
#if DEBUG
                Debugger.WriteLine(LogLevel.Info, "Loading functions");
                Stopwatch watch = new Stopwatch();
                watch.Start();
#endif
                InitFunctions();
#if DEBUG
                watch.Stop();
                Debugger.WriteLine(
                LogLevel.Info,
                $"Functions loaded. Time taken: {watch.Elapsed.TotalMilliseconds} ms.");
#endif
            }
开发者ID:MrSwiss,项目名称:CM3D2.MaidFiddler,代码行数:23,代码来源:MaidInfo.cs


注:本文中的Maid类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。