public void CreateInspiredReactable(Artable.Status status) { switch (status) { case Artable.Status.Ugly: effect = inspired1; break; case Artable.Status.Okay: effect = inspired2; break; default: effect = inspired3; break; } if (fossilReactable == null) { fossilReactable = new EmoteReactable(gameObject, "Inspired", Db.Get().ChoreTypes.Emote, "anim_react_starry_eyes_kanim", 15, 8, 0, 10f, float.PositiveInfinity) .AddThought(Db.Get().Thoughts.Angry); /*.AddStep(new EmoteReactable.EmoteStep * { * anim = "react", * startcb = new Action<GameObject>(AddReactionEffect) * });*/ //.AddThought(Db.Get().Thoughts.Happy); //.AddPrecondition(new Reactable.ReactablePrecondition(ReactorIsOnFloor)); } }
private void OnRefreshUserMenu(object obj) { if (!((UnityEngine.Object) this.artable != (UnityEngine.Object)null)) { return; } string nextIcon = "action_direction_right"; Artable.Status status = artable.stages.Find(s => s.id == artable.CurrentStage).statusItem; int count = artable.stages.Where(s => s.statusItem == status).ToList().Count; if (count > 1) { Game.Instance?.userMenu?.AddButton(this.gameObject, new KIconButtonMenu.ButtonInfo(nextIcon, INTERNALSTRINGS.NEXT_ART_BUTTON.TEXT, new System.Action(this.OnNextArtClicked), Action.BuildMenuKeyQ, tooltipText: ((string)INTERNALSTRINGS.NEXT_ART_BUTTON.TOOLTIP))); } }
/*private void OnCopySettings(object data) * { * throw new NotImplementedException("This one is not thrown..."); * PickableLook component = ((UnityEngine.GameObject)data).GetComponent<PickableLook>(); * if (!((UnityEngine.Object)component != (UnityEngine.Object)null)) * return; * this.artable.SetStage(component.artable.CurrentStage, false); * Debug.Log("SelectableArt: copied"); * }*/ private void OnNextArtClicked() { Artable.Status status = artable.stages.Find(s => s.id == artable.CurrentStage).statusItem; List <Artable.Stage> potential_stages = new List <Artable.Stage>(); foreach (Artable.Stage s in artable.stages) { if (s.statusItem == status) { potential_stages.Add(s); } } int i = potential_stages.FindIndex(s => s.id == artable.CurrentStage); Artable.Stage desiredStage = (i + 1 == potential_stages.Count) ? potential_stages[0] : potential_stages[i + 1]; artable.SetStage(desiredStage.id, false); }
private void OnRefreshUserMenu(object _) { if (!((UnityEngine.Object) this.artable != (UnityEngine.Object)null) || this.artable.CurrentStatus == Artable.Status.Ready) { return; } string nextIcon = "action_direction_right"; string rotateIcon = "action_direction_both"; Artable.Status status = artable.stages.Find(s => s.id == artable.CurrentStage).statusItem; int count = artable.stages.Where(s => s.statusItem == status).ToList().Count; if (count > 1) { Game.Instance?.userMenu?.AddButton(this.gameObject, new KIconButtonMenu.ButtonInfo(nextIcon, STRINGS.NEXT_ART_BUTTON.TEXT, new System.Action(this.OnNextArtClicked), Action.BuildMenuKeyQ, tooltipText: ((string)STRINGS.NEXT_ART_BUTTON.TOOLTIP))); } if (this.gameObject.GetComponent <Rotatable>() != null) { Game.Instance?.userMenu?.AddButton(this.gameObject, new KIconButtonMenu.ButtonInfo(rotateIcon, STRINGS.ROTATE_ART_BUTTON.TEXT, new System.Action(this.OnRotateClicked), Action.BuildMenuKeyO, tooltipText: ((string)STRINGS.ROTATE_ART_BUTTON.TOOLTIP))); } }