Exemplo n.º 1
0
    // Update is called once per frame
    public void inspect(GameObject obj, inspectType type, int priority, Dictionary <StatType, float> stats = null)
    {
        //Debug.Log("START ins -"+obj);
        inspectBlock b = new inspectBlock(obj, type, priority, stats);
        int          i = 0;

        while (i < blocks.Count)
        {
            if (b.priority < blocks[i].priority)
            {
                break;
            }
            i++;
        }

        if (i == 0)
        {
            if (blocks.Count > 0)
            {
                killInspection();
            }
            createInspection(b);
        }
        blocks.Insert(i, b);
    }
Exemplo n.º 2
0
 public inspectBlock(GameObject o, inspectType t, int p, Dictionary <StatType, float> s)
 {
     obj      = o;
     type     = t;
     stats    = s;
     priority = p;
 }