Beispiel #1
0
 public static void FadeStand(IDialogueProfile profile, float time, bool fadeIn, ICancellee cT, Action done)
 {
     if (!main.renders.TryGetValue(stands[profile].loc, out var pr))
     {
         throw new Exception($"Cannot fade stand that is not being rendered: {profile.DisplayName}");
     }
     main.RunRIEnumerator(_FadeStand(pr, time, fadeIn, new JointCancellee(cT, pr.cT), done));
 }
Beispiel #2
0
        public static StandLocation?UpdateStandEmote(IDialogueProfile profile, Emote emote)
        {
            if (!stands.ContainsKey(profile))
            {
                return(null);
            }
            var location = stands[profile].loc;

            stands[profile]    = (location, emote);
            var(flip, sprites) = IsLeft(location) ? profile.FindLeftStand(emote) : profile.FindRightStand(emote);
            var target = main.Target(location);

            main.NewPiecewise(location, sprites);
            var tr = target.transform;
            var ls = tr.localScale;

            ls.x          = Mathf.Abs(ls.x) * (flip ? -1 : 1);
            tr.localScale = ls;
            return(location);
        }
Beispiel #3
0
        public static void SetOpacity(IDialogueProfile profile, float opacity)
        {
            var r = main.renders[stands[profile].loc];

            r.ApplyColor(r.lastColor.WithA(opacity));
        }
Beispiel #4
0
 private static Emote?GetStandEmote(IDialogueProfile profile) =>
 stands.TryGetValue(profile, out var x) ? x.e : (Emote?)null;