Esempio n. 1
0
    protected void Init()
    {
        if (null != m_ActionFrameData)
        {
            m_fTime  = (float)m_ActionFrameData.Time;
            m_Config = m_ActionFrameData.MoveTransformFrame;
        }
        else
        {
            m_ActionFrameData = new ActionFrameData();
            m_Config          = new MoveTransformFrameConfig();
        }

        if (m_Config.Path == null || m_Config.Path.Count < 1)
        {
            m_Config.Path = new System.Collections.Generic.List <Common.Auto.ThriftVector3>();
            Common.Auto.ThriftVector3 origin = new Common.Auto.ThriftVector3();
            m_Config.Path.Add(origin);
        }
        RefreshDisplayString();

        var go = new GameObject();

        helper = go.AddComponent <MoveFrameHelper>();
        helper.Init(m_Config.Path);

        curPos  = 0;
        lastPos = curPos;
        Selection.activeGameObject = helper.GetNode(curPos).gameObject;


        m_Instance.minSize = new Vector2(WINDOW_MIN_WIDTH, WINDOW_MIN_HIEGHT);
    }
Esempio n. 2
0
    protected void Init()
    {
        if (null != m_ActionFrameData)
        {
            m_fTime = (float)m_ActionFrameData.Time;
            m_Config = m_ActionFrameData.MoveTransformFrame;
        }
        else
        {
            m_ActionFrameData = new ActionFrameData();
            m_Config = new MoveTransformFrameConfig();
        }

        if(m_Config.Path == null || m_Config.Path.Count < 1)
        {
            m_Config.Path = new System.Collections.Generic.List<Common.Auto.ThriftVector3>();
            Common.Auto.ThriftVector3 origin = new Common.Auto.ThriftVector3();
            m_Config.Path.Add(origin);
        }
        RefreshDisplayString();

        var go = new GameObject();
        helper = go.AddComponent<MoveFrameHelper>();
        helper.Init(m_Config.Path);

        curPos = 0;
        lastPos = curPos;
        Selection.activeGameObject = helper.GetNode(curPos).gameObject;


        m_Instance.minSize = new Vector2(WINDOW_MIN_WIDTH, WINDOW_MIN_HIEGHT);
    }
Esempio n. 3
0
 void OnDestroy()
 {
     helper.Clear();
     Destroy(helper.gameObject);
     helper = null;
 }
Esempio n. 4
0
 void OnDestroy()
 {
     helper.Clear();
     Destroy(helper.gameObject);
     helper = null;
 }