コード例 #1
0
ファイル: CardInspector.cs プロジェクト: RZNewman/Conflict
    // 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);
    }
コード例 #2
0
ファイル: CardInspector.cs プロジェクト: RZNewman/Conflict
 public inspectBlock(GameObject o, inspectType t, int p, Dictionary <StatType, float> s)
 {
     obj      = o;
     type     = t;
     stats    = s;
     priority = p;
 }