protected override void InitializeHpBar() { base.InitializeHpBar(); var title = Costumes.FirstOrDefault(costume => costume.ItemSubType == ItemSubType.Title && costume.equipped); HPBar.SetTitle(title); }
protected override void ShowCutscene() { if (Costumes.Exists(x => x.ItemSubType == ItemSubType.FullCostume)) { return; } AreaAttackCutscene.Show(GetAmorId()); }
private void UpdateTail() { if (IsFullCostumeEquipped) { return; } var tailCostume = Costumes.FirstOrDefault(costume => costume.ItemSubType == ItemSubType.TailCostume); if (tailCostume is null) { UpdateTailByCustomizeIndex(Model.tailIndex); } else { UpdateTailById(tailCostume.Id); } }
private void UpdateHair() { if (IsFullCostumeEquipped) { return; } var hairCostume = Costumes.FirstOrDefault(costume => costume.ItemSubType == ItemSubType.HairCostume); if (hairCostume is null) { UpdateHairByCustomizeIndex(Model.hairIndex); } else { UpdateHairById(hairCostume.Id); } }
private void UpdateEye() { if (IsFullCostumeEquipped) { return; } var eyeCostume = Costumes.FirstOrDefault(costume => costume.ItemSubType == ItemSubType.EyeCostume); if (eyeCostume is null) { UpdateEyeByCustomizeIndex(Model.lensIndex); } else { UpdateEyeById(eyeCostume.Id); } }
/// <summary> /// Serializes the current instance into a JSON object. /// </summary> /// <returns>The JSON representation of the current instance.</returns> public JToken ToJson() { return(new JObject { { "objName", Settings.StageName }, { "variables", new JArray(Variables.Select(x => x.ToJson())) }, { "lists", new JArray(Lists.Select(x => x.ToJson())) }, { "scripts", new JArray(Scripts.Select(x => x.ToJson())) }, { "scriptComments", new JArray(Comments.Select(x => x.ToJson())) }, { "sounds", new JArray(Sounds.Select(x => x.ToJson())) }, { "costumes", new JArray(Costumes.Select(x => x.ToJson())) }, { "currentCostumeIndex", CurrentCostume }, { "penLayerID", PenLayer }, { "penLayerMD5", PenLayerMd5 }, { "tempoBPM", Tempo }, { "videoAlpha", VideoAlpha }, { "children", new JArray(Children.Select(x => x.ToJson())) }, { "info", Info.ToJson() } }); }
/// <summary> /// Serializes the current instance into a JSON object. /// </summary> /// <returns>The JSON representation of the current instance.</returns> public JToken ToJson() { return(new JObject { { "objName", Name }, { "variables", new JArray(Variables.Select(x => x.ToJson())) }, { "lists", new JArray(Lists.Select(x => x.ToJson())) }, { "scripts", new JArray(Scripts.Select(x => x.ToJson())) }, { "scriptComments", new JArray(Comments.Select(x => x.ToJson())) }, { "sounds", new JArray(Sounds.Select(x => x.ToJson())) }, { "costumes", new JArray(Costumes.Select(x => x.ToJson())) }, { "currentCostumeIndex", CurrentCostume }, { "scratchX", Location.X }, { "scratchY", Location.Y }, { "scale", Scale }, { "direction", Direction }, { "rotationStyle", RotationStyle.ToSerializedString() }, { "isDraggable", Draggable }, { "indexInLibrary", LibraryIndex }, { "visible", Visible }, { "spriteInfo", new JValue(SpriteInfo) } }); }
public void SetCostume(Costumes costume) { orig_SetCostume(costume); ModHooks.Instance.OnPlayerSetCostume(SkinnedMesh); }
public extern void orig_SetCostume(Costumes costume);