Ejemplo 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);
    }
Ejemplo 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));
        }
Ejemplo 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);
        }
Ejemplo n.º 4
0
 public void Dispose()
 {
     CodeBlock.Clear();
     tables.Clear();
 }