public void Set(int targetId, bool isBlush, Sugarism.EFace face, Sugarism.ECostume costume, Sugarism.EPosition pos) { Hide(); if (false == ExtTarget.isValid(targetId)) { Log.Error(string.Format("invalid target id; {0}", targetId)); return; } Target target = Manager.Instance.DT.Target[targetId]; setBaseShape(target.baseShape); if (isBlush) { setBlush(target.blush); setBlush(target.blushPosX, target.blushPosY); } setBlush(isBlush); base.setFaceExpression(get(ref target, face)); setFaceExpression(target.faceExpPosX, target.faceExpPosY); setFaceExpression(true); base.setCostume(get(ref target, costume)); setCostume(true); set(pos); Show(); }
private EditTargetAppear() { _faceList = new List <Sugarism.EFace>(); Array arr = Enum.GetValues(typeof(Sugarism.EFace)); foreach (var v in arr) { Sugarism.EFace item = (Sugarism.EFace)v; _faceList.Add(item); } _costumeList = new List <Sugarism.ECostume>(); arr = Enum.GetValues(typeof(Sugarism.ECostume)); foreach (var v in arr) { Sugarism.ECostume item = (Sugarism.ECostume)v; _costumeList.Add(item); } _posList = new List <Sugarism.EPosition>(); arr = Enum.GetValues(typeof(Sugarism.EPosition)); foreach (var v in arr) { Sugarism.EPosition item = (Sugarism.EPosition)v; _posList.Add(item); } }
private void reset(int targetId, bool isBlush, Sugarism.EFace face, Sugarism.ECostume costume, Sugarism.EPosition pos) { if (Common.Instance.IsValidTarget(targetId)) { SelectedItem = TargetList[targetId]; } else { if (null == TargetList) { SelectedItem = null; } else if (TargetList.Length > 0) { SelectedItem = TargetList[0]; } else { SelectedItem = null; } } IsBlush = isBlush; Face = face; Costume = costume; Position = pos; }
private void onCmdTargetAppear(int targetId, bool isBlush, Sugarism.EFace face, Sugarism.ECostume costume, Sugarism.EPosition position) { //InputPanel.Hide(); StoryCharacterPanel.Set(targetId, isBlush, face, costume, position); //Invoke(ON_TIMER_NAME, 0.1f); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if ((null == value) || (false == (value is Sugarism.EFace))) { return(string.Empty); } Sugarism.EFace face = (Sugarism.EFace)value; return(face.ToString()); }
/// <summary> /// Show View.Popup.EditTargetAppear. /// </summary> /// <param name="targetId">Target Id before editing.</param> /// <param name="isBlush">IsBlush before editing</param> /// <param name="face">Face before editing.</param> /// <param name="costume">Costume before editing.</param> /// <param name="pos">Position before editing.</param> /// <returns>Whether edit or not.</returns> public bool Show(int targetId, bool isBlush, Sugarism.EFace face, Sugarism.ECostume costume, Sugarism.EPosition pos) { reset(targetId, isBlush, face, costume, pos); View.Popup.EditTargetAppear view = new View.Popup.EditTargetAppear(this); bool?result = view.ShowDialog(); switch (result) { case true: return(true); default: return(false); } }
private Sprite get(ref Target target, Sugarism.EFace face) { switch (face) { case Sugarism.EFace.Default: return(target.faceExpDefault); case Sugarism.EFace.Happy: return(target.faceExpHappy); case Sugarism.EFace.Sad: return(target.faceExpSad); case Sugarism.EFace.Angry: return(target.faceExpAngry); case Sugarism.EFace.Shock: return(target.faceExpShock); default: return(null); } }
public void Invoke(int targetId, bool isBlush, Sugarism.EFace face , Sugarism.ECostume costume, Sugarism.EPosition position) { _event.Invoke(targetId, isBlush, face, costume, position); }
// default handler private void onCmdTargetAppear(int targetId, bool isBlush, Sugarism.EFace face , Sugarism.ECostume costume, Sugarism.EPosition position) { Log.Debug(string.Format("onCmdTargetAppear; targetId({0}, face({1}), blush({2}), costume({3}), pos({4})", targetId, face, isBlush, costume, position)); }