public void SetModuleSet(ModuleSet modSet, ButtonPress callBack, Select select)
    {
        moduleSet      = modSet;
        buttonCallBack = callBack;
        selectCallBack = select;

        ModuleName.text        = moduleSet.GetName();
        ModuleDescription.text = moduleSet.GetDescription();
        ModuleMod.text         = moduleSet.GetParentModName();

        ModuleTexture.overrideSprite = moduleSet.GetTexture();
        ModuleTexture.preserveAspect = true;
    }
Exemple #2
0
    public void SetModuleSet(ModuleSet modSet, ButtonPress callBack, Select select)
    {
        moduleSet      = modSet;
        buttonCallBack = callBack;
        selectCallBack = select;

        ModuleName.text        = moduleSet.GetName();
        ModuleDescription.text = moduleSet.GetDescription();
        ModuleMod.text         = "Mod: " + moduleSet.GetParentModName();

        Texture2D texture = moduleSet.GetTexture();

        ModuleTexture.sprite         = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
        ModuleTexture.preserveAspect = true;
    }