示例#1
0
        // Token: 0x06000006 RID: 6 RVA: 0x00002368 File Offset: 0x00000568
        public static List <Maid> GetVisibleMaidList()
        {
            List <Maid>  list         = new List <Maid>();
            CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
            int          maidCount    = characterMgr.GetMaidCount();

            for (int i = 0; i < maidCount; i++)
            {
                Maid maid = characterMgr.GetMaid(i);
                if (maid != null && maid.isActiveAndEnabled && maid.Visible)
                {
                    list.Add(maid);
                }
            }
            int stockMaidCount = characterMgr.GetStockMaidCount();

            for (int j = 0; j < stockMaidCount; j++)
            {
                Maid stockMaid = characterMgr.GetStockMaid(j);
                if (stockMaid != null && stockMaid.isActiveAndEnabled && stockMaid.Visible && !list.Contains(stockMaid))
                {
                    list.Add(stockMaid);
                }
            }
            return(list);
        }
示例#2
0
        private Maid FindPrevNextMaid(bool next)
        {
            List <Maid>  list = new List <Maid>();
            CharacterMgr val  = GameMain.Instance.CharacterMgr;

            for (int i = 0; i < val.GetMaidCount(); i++)
            {
                Maid val2 = val.GetMaid(i);
                if (val2 != null && val2.body0.isLoadedBody)
                {
                    list.Add(val2);
                }
            }
            if (list.Count == 0)
            {
                return(null);
            }
            if (focusChara != null)
            {
                int num = list.IndexOf(focusChara);
                if (num >= 0)
                {
                    num += (next ? 1 : (-1));
                    num  = (num + list.Count) % list.Count;
                    return(list[num]);
                }
            }
            return(list[0]);
        }
示例#3
0
        // Token: 0x06000281 RID: 641 RVA: 0x00015CEC File Offset: 0x00013EEC
        public void DetectMaidTarget(bool useStockMaid)
        {
            CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;

            if (useStockMaid)
            {
                this.DetectTarget(new Func <int, Maid>(characterMgr.GetStockMaid), characterMgr.GetStockMaidCount());
                return;
            }
            this.DetectTarget(new Func <int, Maid>(characterMgr.GetMaid), characterMgr.GetMaidCount());
        }
示例#4
0
        private Maid FindFirstMaid()
        {
            CharacterMgr val = GameMain.Instance.CharacterMgr;

            for (int i = 0; i < val.GetMaidCount(); i++)
            {
                Maid val2 = val.GetMaid(i);
                if (val2 != null && val2.body0.isLoadedBody)
                {
                    return(val2);
                }
            }
            return(null);
        }
示例#5
0
        // Token: 0x06000280 RID: 640 RVA: 0x00015C84 File Offset: 0x00013E84
        public void DetectAllTarget(bool useStockMaid = false)
        {
            CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;

            if (useStockMaid)
            {
                this.DetectTarget(new Func <int, Maid>(characterMgr.GetStockMaid), characterMgr.GetStockMaidCount());
            }
            else
            {
                this.DetectTarget(new Func <int, Maid>(characterMgr.GetMaid), characterMgr.GetMaidCount());
            }
            this.DetectTarget(new Func <int, Maid>(characterMgr.GetMan), characterMgr.GetManCount());
        }
        private static XElement GetMaidListData()
        {
            XElement     xelement     = new XElement("Maids");
            CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
            int          maidCount    = characterMgr.GetMaidCount();

            for (int i = 0; i < maidCount; i++)
            {
                Maid maid = characterMgr.GetMaid(i);
                bool flag = !maid;
                if (!flag)
                {
                    XElement maidData = SceneDataManager.GetMaidData(maid);
                    bool     flag2    = maidData == null;
                    if (!flag2)
                    {
                        xelement.Add(maidData);
                    }
                }
            }
            return(xelement);
        }
 private static string LoadAnimation(PhotoMotionData data, Maid maid)
 {
     if (!string.IsNullOrEmpty(data.direct_file))
     {
         maid.IKTargetToBone("左手", (Maid)null, "無し", Vector3.zero);
         maid.IKTargetToBone("右手", (Maid)null, "無し", Vector3.zero);
         if (!data.is_mod && !data.is_mypose)
         {
             maid.body0.LoadAnime(data.direct_file.ToLower(), data.direct_file, false, data.is_loop);
             return(data.direct_file.ToLower());
         }
         else
         {
             byte[] numArray = new byte[0];
             try
             {
                 using (FileStream fileStream = new FileStream(data.direct_file, FileMode.Open, FileAccess.Read))
                 {
                     numArray = new byte[fileStream.Length];
                     fileStream.Read(numArray, 0, numArray.Length);
                 }
             }
             catch
             {
             }
             if (0 >= numArray.Length)
             {
                 return("");
             }
             maid.body0.LoadAnime(data.id.ToString(), numArray, false, data.is_loop);
             return(data.id.ToString());
             // Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
             //     {
             //         Maid.AutoTwist.ShoulderL,
             //         Maid.AutoTwist.ShoulderR,
             //         Maid.AutoTwist.WristL,
             //         Maid.AutoTwist.WristR,
             //         Maid.AutoTwist.ThighL,
             //         Maid.AutoTwist.ThighR
             //     };
             // foreach (Maid.AutoTwist f_eType in autoTwistArray)
             //     maid.SetAutoTwist(f_eType, true);
         }
     }
     else
     {
         if (string.IsNullOrEmpty(data.call_script_fil) || string.IsNullOrEmpty(data.call_script_label))
         {
             return("");
         }
         CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
         int          sloat        = 0;
         for (int nMaidNo = 0; nMaidNo < characterMgr.GetMaidCount(); ++nMaidNo)
         {
             if ((UnityEngine.Object)maid == (UnityEngine.Object)characterMgr.GetMaid(nMaidNo))
             {
                 sloat = nMaidNo;
                 break;
             }
         }
         GameMain.Instance.ScriptMgr.LoadMotionScript(sloat, false, data.call_script_fil, data.call_script_label, maid.Param.status.guid, true, true);
     }
     return("");
 }