Esempio n. 1
0
    private Item createItemFromCodeBlock(CodeBlock b)
    {
        GameObject item     = Instantiate(Level.currentLevel.itemPrefab, transform.position + new Vector3(UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f)), Quaternion.identity);
        Item       toReturn = item.GetComponent <Item>();

        toReturn.Block = b;
        b.Clear();
        return(toReturn);
    }
Esempio n. 2
0
        public QueryResultReader SumbitQueries()
        {
            if (CodeBlock.Length == 0)
            {
                return(null);
            }

            string query = CodeBlock.GetQuery();

            Type[] types = CodeBlock.GetQueryTypes();
            var    ds    = FillDataSet(query);

            CodeBlock.Clear();

            return(new QueryResultReader(this, types, ds));
        }
Esempio n. 3
0
        public int SubmitChanges()
        {
            if (CodeBlock.Length == 0)
            {
                return(-1);
            }

            OnRowChanging(RowEvents);

            var cmd   = sqlCommand(CodeBlock.GetNonQuery());
            int count = cmd.ExecuteNonQuery();

            CodeBlock.Clear();

            OnRowChanged(RowEvents);
            RowEvents.Clear();

            return(count);
        }
Esempio n. 4
0
 public void Dispose()
 {
     CodeBlock.Clear();
     tables.Clear();
 }