Ejemplo n.º 1
0
    Transform addTurretToUI(TurretInfo turretInfo)
    {
        Transform objectUI = Instantiate(ObjectUIPrefab, ListUIObject.position, ListUIObject.rotation).transform;

        setTurretInfo(objectUI, turretInfo, (currentKey + 1).ToString());
        UI.AddKey(keys[currentKey], () => Master.StartBuilding(turretInfo));
        currentKey++;
        objectUI.SetParent(ListUIObject, false);

        return(objectUI);
    }