コード例 #1
0
 public void CreateClass(FFMonoBehaviour havior)
 {
     if (m_occurEvent == false)
     {
         havior.classIndex = GenerateClassIndex();
         if (havior.classIndex == 0)
         {
             Debug.Log(havior.name);
         }
         m_classList.Add(havior.classIndex, havior);
     }
     else
     {
         m_prepareAwakeList.Add(havior);
     }
 }
コード例 #2
0
    public void FixedUpdate()
    {
        m_elapsedTime += Time.fixedDeltaTime / Time.timeScale;
        if (m_elapsedTime < 1)
        {
            return;
        }

        m_elapsedTime -= 1;

        if (m_classList.Count != 0)
        {
            Dictionary <int, FFMonoBehaviour> .Enumerator rator = m_classList.GetEnumerator();
            while (rator.MoveNext())
            {
                FFMonoBehaviour beHavior = rator.Current.Value;
                if (beHavior == null)
                {
                    continue;
                }
                beHavior.UpdateOneSecond();
            }
        }
    }
コード例 #3
0
    public void RemoveClass(int index)
    {
        if (m_removeClass.ContainsKey(index))
        {
            FFMonoBehaviour haviour = (FFMonoBehaviour)m_removeClass[index];
            if (haviour != null)
            {
                Debug.Log(haviour.name);
            }
            else
            {
                Debug.Log("RemoveClass Duplicate Add 0!!!!!!!!");
                return;
            }
        }

        if (m_classList.ContainsKey(index) == false)
        {
            Debug.Log(string.Format("RemoveClass noClass!! 0!!!!!!!!", index));
            return;
        }

        m_removeClass.Add(index, m_classList[index]);
    }
コード例 #4
0
    void LateUpdate()
    {
        m_occurEvent = true;
        if (m_classList.Count != 0)
        {
            while (true)
            {
                if (m_occurMessageList.Count == 0)
                {
                    break;
                }

                EventActionMessgeInfo info = m_occurMessageList[0];
                Dictionary <int, FFMonoBehaviour> .Enumerator rator = m_classList.GetEnumerator();
                while (rator.MoveNext())
                {
                    FFMonoBehaviour beHavior = rator.Current.Value;
                    if (beHavior == null)
                    {
                        continue;
                    }

                    beHavior.OccurEventActionMessage(info._msg, info._param);
                }
                m_occurMessageList.RemoveAt(0);
            }
        }
        m_occurEvent = false;

        if (m_removeClass.Count != 0)
        {
            Dictionary <int, FFMonoBehaviour> .Enumerator rator = m_removeClass.GetEnumerator();
            while (rator.MoveNext())
            {
                if (ReturnClassIndex(rator.Current.Key) == false)
                {
                    FFMonoBehaviour beHavior = rator.Current.Value;
                    if (beHavior)
                    {
                        Debug.Log(string.Format("{0}Class Id Error!1", beHavior.name));
                    }
                }
                m_classList.Remove(rator.Current.Key);
            }
            m_removeClass.Clear();
        }

        if (m_prepareAwakeList.Count != 0)
        {
            for (int i = 0; i < m_prepareAwakeList.Count; ++i)
            {
                FFMonoBehaviour beHavior = m_prepareAwakeList[i];
                beHavior.classIndex = GenerateClassIndex();
                if (beHavior.classIndex == 0)
                {
                    Debug.Log(beHavior.name);
                }
                m_classList.Add(beHavior.classIndex, beHavior);
            }
            m_prepareAwakeList.Clear();
        }
    }
コード例 #5
0
 public override void Enter()
 {
     FFMonoBehaviour.Destroy(GameScene.Instance.m_enemy.gameObject);
     GameScene.Instance.battleStateManager.SetState(BattleStateIndex.BattleReady);
 }