Exemple #1
0
    public void Init(slagtool.slag slag)
    {
        m_slag = slag;

        if (m_sm == null)
        {
            m_sm = new StateManager();
            m_sm.Init(this);
        }
    }
Exemple #2
0
    public void Init(GameObject go, bool bCompileOnly = false)
    {
        if (m_bInitialized)
        {
            return;
        }

        m_bInitialized = true;

#if SRAGRELEASE
        slagtool.util.SetDebugLevel(0);
#else
        slagtool.util.SetDebugLevel(1);
#endif

        //表示の切り替え
        slagtool.runtime.builtin.builtin_sysfunc.m_printFunc   = (s) => { Debug.Log(s); guiDisplay.Write(s); };
        slagtool.runtime.builtin.builtin_sysfunc.m_printLnFunc = (s) => { Debug.Log(s); guiDisplay.WriteLine(s); };

        //デバッグログ
        slagtool.util.SetLogFunc(Debug.Log, Debug.Log);

        slagtool.util.SetBuiltIn(typeof(slagunity_builtinfunc));
        slagtool.util.SetCalcOp(slagunity_builtincalc_op.Calc_op);

        if (m_customBuitInList != null)
        {
            foreach (var t in m_customBuitInList)
            {
                slagtool.util.SetBuiltIn(t);
            }
        }

        if (!bCompileOnly)
        {
            if (go != null)
            {
                m_root = go.GetComponent <slagunity_root>();
                if (m_root == null)
                {
                    m_root = go.AddComponent <slagunity_root>();
                }
            }
        }

        m_slag          = new slagtool.slag(this);
        m_slag.m_script = m_script;
    }
Exemple #3
0
    public Hashtable m_usrtbl = new Hashtable();  //ユーザ用。必要に応じて使用してください。

    public void Init(slagtool.slag slag)
    {
        m_slag = slag;
    }
Exemple #4
0
 public slag(object owner)
 {
     m_latest_slag = this;
     m_owner       = owner;
 }
Exemple #5
0
 public void SetSlag(slagtool.slag slag)
 {
     m_slag = slag;
 }