Exemple #1
0
    // ポーズ解除
    static public void Resume(PauseTag tag = PauseTag.Pause, bool IncludeCollider = true)
    {
        //対象タグがポーズされていなければリターン
        if (!s_TargetByTag[tag].m_IsPause)
        {
            return;
        }

        s_TargetByTag[tag].m_IsPause = false;
        foreach (var obj in s_TargetByTag[tag].m_Targets)
        {
            if (obj != null)
            {
                obj.OnResume();
            }
        }

        if (IncludeCollider)
        {
            foreach (var obj in s_TargetByTag[tag].m_Targets)
            {
                if (obj != null)
                {
                    obj.EnableCollider();
                }
            }
        }
    }
Exemple #2
0
        public List <ITag> Matches(string text)
        {
            var foundMatches = new List <ITag>();

            MatchCollection regexMatches = Regex.Matches(text);

            foreach (Match match in regexMatches)
            {
                var      matchStart = match.Index;
                var      matchEnd   = match.Index + match.Length - 1; // 0-based indices.
                PauseTag tag        = new PauseTag(matchStart, matchEnd, match.Value);
                foundMatches.Add(tag);
            }

            return(foundMatches);
        }
Exemple #3
0
 // ポーズ
 static public void Pause(PauseTag tag = PauseTag.Pause, bool IncludeCollider = true)
 {
     //対象タグが既にポーズ中ならリターン
     if (!s_TargetByTag[tag].m_IsPause)
     {
         s_TargetByTag[tag].m_IsPause = true;
         foreach (var obj in s_TargetByTag[tag].m_Targets)
         {
             obj.OnPause();
         }
     }
     if (IncludeCollider && !s_TargetByTag[tag].m_IsColPause)
     {
         s_TargetByTag[tag].m_IsColPause = true;
         foreach (var obj in s_TargetByTag[tag].m_Targets)
         {
             obj.DisableCollider();
         }
     }
 }
Exemple #4
0
 static public bool IsTagPause(PauseTag tag = PauseTag.Pause)
 {
     return(s_TargetByTag[tag].m_IsPause);
 }