void Update() { if (!Input.GetMouseButton(0)) { return; } if (EventSystem.current.IsPointerOverGameObject()) { return; } Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (ActionLogic.selChr == null) { if (Physics.Raycast(ray, out hit)) { if (hit.collider.gameObject.name.Contains("Chr")) { ActionLogic.Pick(hit); } else { //DragCamera(); } } else { //DragCamera(); } } else { if (Physics.Raycast(ray, out hit)) { if (hit.collider.gameObject.name == ActionLogic.selChr.flesh.name) { return; } else if (hit.collider.gameObject.name.Contains("Chr")) { ActionLogic.Pick(hit); } else if (hit.collider.gameObject.name == "Terrain") { if (hit.point.y > 0) { ActionLogic.selChr.Goto(hit.point); ActionLogic.ClearSelection(); } else { return; } } } } }
public static ActionFX MakeActionFX(ref ActionRequestData data, ClientCharacterVisualization parent) { ActionLogic logic = GameDataSource.Instance.ActionDataByType[data.ActionTypeEnum].Logic; switch (logic) { case ActionLogic.Melee: return(new MeleeActionFX(ref data, parent)); case ActionLogic.RangedFXTargeted: return(new FXProjectileTargetedActionFX(ref data, parent)); case ActionLogic.Trample: return(new TrampleActionFX(ref data, parent)); case ActionLogic.AoE: return(new AoeActionFX(ref data, parent)); case ActionLogic.Stunned: return(new AnimationOnlyActionFX(ref data, parent)); case ActionLogic.Target: return(new TargetActionFX(ref data, parent)); case ActionLogic.ChargedShield: case ActionLogic.ChargedLaunchProjectile: return(new ChargedActionFX(ref data, parent)); case ActionLogic.StealthMode: return(new StealthModeActionFX(ref data, parent)); default: throw new System.NotImplementedException(); } }
internal bool UpgradeArchitectureToRemote(out Exception ex) { ex = null; int errCount = 0; try { Architecture a = this.CurrentArchitecture; List <KellRole.Action> atcs = a.Acts; List <Department> deps = a.Deps; List <Module> mods = a.Mods; List <Permission> perms = a.Pers; List <Role> roles = a.Roles; List <UserGroup> ugrps = a.Ugroups; List <User> users = a.Users; ActionLogic.GetInstance().UpgradeList(atcs); DepartmentLogic.GetInstance().UpgradeList(deps); ModuleLogic.GetInstance().UpgradeList(mods); PermissionLogic.GetInstance().UpgradeList(perms); RoleLogic.GetInstance().UpgradeList(roles); UserGroupLogic.GetInstance().UpgradeList(ugrps); UserLogic.GetInstance().UpgradeList(users); } catch (Exception e) { errCount++; ex = e; } return(errCount == 0); }
private static Architecture GetRemoteArchitecture() { Architecture a = Architecture.Empty; a.Deps = DepartmentLogic.GetInstance().GetAllDepartments(); a.Ugroups = UserGroupLogic.GetInstance().GetAllUserGroups(); a.Users = UserLogic.GetInstance().GetAllUsers(); a.Mods = ModuleLogic.GetInstance().GetAllModules(); a.Acts = ActionLogic.GetInstance().GetAllActions(); a.Pers = PermissionLogic.GetInstance().GetAllPermissions(); a.Roles = RoleLogic.GetInstance().GetAllRoles(); return(a); }
private void btn_Actn_Click(object sender, EventArgs e) { if (comboBox1.SelectedIndex > -1) { KellRole.Action action = new KellRole.Action(); action.ID = data[comboBox1.SelectedIndex].ID; action.Name = textBox1.Text.Trim(); action.FormName = textBox3.Text.Trim(); action.ControlName = textBox4.Text.Trim(); action.Remark = textBox2.Text; ActionLogic al = ActionLogic.GetInstance(); if (al.ExistsNameOther(action.Name, action.ID)) { if (MessageBox.Show("系统中已经存在该名称,确定还要继续保存么?", "重名提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) { if (al.UpdateAction(action)) { data[comboBox1.SelectedIndex].Name = action.Name; data[comboBox1.SelectedIndex].FormName = action.FormName; data[comboBox1.SelectedIndex].ControlName = action.ControlName; data[comboBox1.SelectedIndex].Remark = action.Remark; RefreshInfo(); MessageBox.Show("修改成功!"); } } else { textBox1.Focus(); textBox1.SelectAll(); } } else { if (al.UpdateAction(action)) { data[comboBox1.SelectedIndex].Name = action.Name; data[comboBox1.SelectedIndex].FormName = action.FormName; data[comboBox1.SelectedIndex].ControlName = action.ControlName; data[comboBox1.SelectedIndex].Remark = action.Remark; RefreshInfo(); MessageBox.Show("修改成功!"); } } } else { MessageBox.Show("先选定要修改的项目!"); } }
private void button1_Click(object sender, EventArgs e) { if (comboBox1.SelectedIndex > -1) { if (MessageBox.Show("确定要删除该项目?", "删除提醒", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) { KellRole.Action action = data[comboBox1.SelectedIndex]; if (ActionLogic.GetInstance().DeleteAction(action)) { data.RemoveAt(comboBox1.SelectedIndex); RefreshInfo(); } } } else { MessageBox.Show("先选定要删除的项目!"); } }
public void CallActiveLogic() { if (_activeLogics.Count < 1) { // we set complete state if it's normal with condition or // if it's fallback type and no conditions exist if ((_keepCompletedState && _currentMode == EActionInitializationMode.Normal) || (_keepCompletedState && _currentMode == EActionInitializationMode.Fallback && string.IsNullOrEmpty(_actionCondition.ID))) { _isComplete = true; } Finish(); } else { ActionLogic logic = _activeLogics.Dequeue(); logic.PrepareLogic(CallActiveLogic); logic.Execute(); } }
private void button19_Click(object sender, EventArgs e) { KellRole.Action action = new KellRole.Action(); action.Name = textBox1.Text.Trim(); action.FormName = textBox3.Text.Trim(); action.ControlName = textBox4.Text.Trim(); action.Remark = textBox2.Text; ActionLogic al = ActionLogic.GetInstance(); if (al.ExistsName(action.Name)) { if (MessageBox.Show("系统中已经存在该名称,确定还要继续保存么?", "重名提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) { int id = al.AddAction(action); if (id > 0) { action.ID = id; data.Add(action); RefreshInfo(); MessageBox.Show("添加成功!"); } } else { textBox1.Focus(); textBox1.SelectAll(); } } else { int id = al.AddAction(action); if (id > 0) { action.ID = id; data.Add(action); RefreshInfo(); MessageBox.Show("添加成功!"); } } }
/// <summary> /// Cancels the first instance of the given ActionLogic that is currently running, or all instances if cancelAll is set to true. /// Searches actively running actions first, then looks at the head action in the queue. /// </summary> /// <param name="logic">The ActionLogic to cancel</param> /// <param name="cancelAll">If true will cancel all instances; if false will just cancel the first running instance.</param> /// <param name="exceptThis">If set, will skip this action (useful for actions canceling other instances of themselves).</param> public void CancelRunningActionsByLogic(ActionLogic logic, bool cancelAll, Action exceptThis = null) { for (int i = m_NonBlockingActions.Count - 1; i >= 0; --i) { if (m_NonBlockingActions[i].Description.Logic == logic && m_NonBlockingActions[i] != exceptThis) { m_NonBlockingActions[i].Cancel(); m_NonBlockingActions.RemoveAt(i); if (!cancelAll) { return; } } } if (m_Queue.Count > 0) { if (m_Queue[0].Description.Logic == logic && m_Queue[0] != exceptThis) { m_Queue[0].Cancel(); m_Queue.RemoveAt(0); } } }
/// <summary> /// When requesting an action with this type of ActionLogic, do we need to store the Position where player clicked? /// (We separate this out so that we don't need to send the extra Vector3 across the network if unneeded.) /// </summary> public static bool IsPositionUsed(ActionLogic logic) { return(logic == ActionLogic.RangedFXTargeted); }
public CustomRoleProvider() { roleLogic = new RoleLogic(); actionLogic = new ActionLogic(); }
public void StartTurn() { mainCanvas.SendMessage("ReadTime"); ActionLogic.DowncountMissions(); ActionLogic.DoExploreList(); }
public void ActionExplore() { ActionLogic.selChr.mission = new AMission("探索周边", 1); ActionLogic.AddExploreList(); }
public ActionLogicTest() { _actionRepository = new ActionRepository(new HttpMessageHandlerStub()); actionLogic = new ActionLogic(_actionRepository); }
public ConfigurationController() { roleLogic = new RoleLogic(); actionLogic = new ActionLogic(); notificationLogic = new NotificationLogic(); }