Пример #1
0
    public static int getPosition(string s)
    {
        GameObject g = GameObject.Find(s);
        Camel      c = (Camel)g.GetComponent(typeof(Camel));

        return(c.getPos());
    }
Пример #2
0
    public static void addCamel(string toAdd, int pos)
    {
        GameObject g     = GameObject.Find(toAdd);
        Camel      c     = (Camel)g.GetComponent(typeof(Camel));
        int        toRem = c.getPos();

        if ((spaces[toRem].getCamelOnSpaces()).Contains(toAdd))
        {
            spaces [toRem].removeCamel(toAdd);
        }
        spaces [pos].addCamel(toAdd);
        c.updatePos(pos);
    }