예제 #1
0
    public void GetObjectAt(out GO g, RelPos p)
    {
        int idx = p.toIdx();

        if (idx >= 0)
        {
            g = objs[idx].getObject();
        }
        else
        {
            g = null;
        }
    }
예제 #2
0
    public void SetRelativePositionCallback(
        System.Tuple <RelPos, System.Action <bool, RelPos, GO> > arg)
    {
        RelPos p = arg.Item1;

        System.Action <bool, RelPos, GO> cb = arg.Item2;

        if (this.cbs == null)
        {
            int count = ((RelPos)0).count();
            this.cbs = new System.Action <bool, RelPos, GO> [count];
        }

        int idx = p.toIdx();

        if (idx >= 0)
        {
            this.cbs[idx] = cb;
        }
        else
        {
            this.undefCbs = cb;
        }
    }