Esempio n. 1
0
    /// <summary>
    /// 生成
    /// </summary>
    public static slagunity Create(GameObject go, bool bCompileOnly = false)
    {
        var p = new slagunity();

        p.Init(go, bCompileOnly);
        return(p);
    }
Esempio n. 2
0
 public void Reset()
 {
     if (m_slagunity != null)
     {
         m_slagunity.TerminateNetComm(() => {
             SceneManager.LoadScene("remotereset");
             m_slagunity = null;
         });
     }
 }
Esempio n. 3
0
 void _run(slagunity slag, string src)
 {
     try
     {
         slag.Run();
     }
     catch (SystemException e)
     {
         slagtool.runtime.builtin.builtin_sysfunc.m_printLnFunc(e.Message);
     }
 }
Esempio n. 4
0
 void _loadsrc(slagunity slag, string src)
 {
     try
     {
         slag.LoadSrc(src);
         slag.TransferFileData();
         //slag.TransferBPList(); ファイル表示が正しくなくなるため、CO
     }
     catch (SystemException e)
     {
         slagtool.runtime.builtin.builtin_sysfunc.m_printLnFunc(e.Message);
     }
 }
Esempio n. 5
0
    public static void Create(slagunity p_slagunity)
    {
        if (V == null)
        {
            var go = new GameObject(m_name);
            GameObject.DontDestroyOnLoad(go);

            V = go.AddComponent <slagremote_unity_manager>();

            V.m_start_done = false;

            V.m_bReqAbort  = false;
            V.m_abort_done = false;
            V.m_seq        = new StateSequencer();
        }

        V.m_slagunity = p_slagunity;
    }
Esempio n. 6
0
    void S_INIT(bool bFirst)
    {
        if (bFirst)
        {
            var listtext = ((TextAsset)Resources.Load <TextAsset>("slag/bin/_list")).text;
            var listline = listtext.Split('\n');
            files = new List <string>();
            Array.ForEach(listline, f => {
                var f2 = f.Trim();
                if (!string.IsNullOrEmpty(f2))
                {
                    files.Add(f2);
                }
            });

            m_slagunity = slagunity.Create(gameObject);
            m_slagunity.StartNetComm(slagremote.RUNMODE.RunLimit);

            m_sm.Goto(S_TESTMENU);
        }
    }
Esempio n. 7
0
 private void Start()
 {
     m_slagunity = slagunity.Create(gameObject);
     m_slagunity.StartNetComm(slagremote.RUNMODE.NORMAL);
     m_slagunity.SetResetCallback(Reset);
 }
Esempio n. 8
0
File: menu.cs Progetto: iruka-/slag
 void Start()
 {
     m_slagunity = slagunity.Create(gameObject, false);
     m_slagunity.StartNetComm(slagremote.RUNMODE.RunLimit);
 }
Esempio n. 9
0
 void _endSlag(slagunity slag, Action cb)
 {
     slag.TerminateNetComm(cb);
 }