Exemplo n.º 1
0
 public void ThemeChanged()
 {
     pinkPigSprite   = themeController.GetThemedObject <Sprite>(pinkPig);
     yellowPigSprite = themeController.GetThemedObject <Sprite>(yellowPig);
     bluePigSprite   = themeController.GetThemedObject <Sprite>(bluePig);
     greenPigSprite  = themeController.GetThemedObject <Sprite>(greenPig);
     borgPigSprite   = themeController.GetThemedObject <Sprite>(borgPig);
 }
    public void ThemeChanged()
    {
        // theme has changed so get new object name
        var font = themeController.GetThemedObject <TMP_FontAsset>("font");

        if (font != null && font is TMP_FontAsset)
        {
            tmpPro.font = font;
        }
    }
    public void ThemeChanged()
    {
        var badPiggyAnim           = themeController.GetThemedObject <AnimationClip>("BadPiggyAnim");
        var badPiggyAnimController = new AnimatorOverrideController(animator.runtimeAnimatorController);

        var anims = new List <KeyValuePair <AnimationClip, AnimationClip> >();

        foreach (var a in badPiggyAnimController.animationClips)
        {
            anims.Add(new KeyValuePair <AnimationClip, AnimationClip>(a, badPiggyAnim));
        }

        badPiggyAnimController.ApplyOverrides(anims);

        animator.runtimeAnimatorController = badPiggyAnimController;
    }