private void InitComponents() { labelCompanyName.Text = SCompanyName; leaveBindingSource.DataSource = ActionClass.FillLeaves(OEnrollee.EnrolleeId); this.Text = "Leave/O.B. Form - [ " + OEnrollee.EnrolleeNo.ToString() + " " + OEnrollee.LastName.Trim().ToUpper() + ", " + OEnrollee.FirstName.Trim() + " " + OEnrollee.MiddleName.Substring(0, 1) + ". ]"; }
private void userBindingNavigatorSaveItem_Click(object sender, EventArgs e) { if (passwordTextBox.Text.Equals(textBoxPassword.Text)) { if (userBindingSource != null) { errorProvider1.SetError(passwordTextBox, ""); errorProvider1.SetError(textBoxPassword, ""); this.Validate(); userBindingSource.EndEdit(); int iResult = ActionClass.SaveUser((User)userBindingSource.Current); if (iResult > 0) { Console.WriteLine(iResult.ToString()); toolStripStatusLabel1.Text = "Saved."; UtilityClass.GetMessageBox(1); Thread.Sleep(200); } } } else { errorProvider1.SetError(passwordTextBox, "Password not match."); errorProvider1.SetError(textBoxPassword, "Password not match."); } toolStripStatusLabel1.Text = "Ready..."; }
private void miSetProperty_Click(object sender, EventArgs e) { MenuItemDataProperty data = (MenuItemDataProperty)(((MenuItem)sender).Tag); MethodDiagramViewer mv = MethodViewer.GetCurrentViewer(); ActionClass act = OnCreateSetPropertyAction(data); if (act != null) { if (!(this.ClassPointer is LocalVariable)) { if (MethodEditContext.IsWebPage) { if (!MethodEditContext.CheckAction(act, this.FindForm())) { return; } } } act.SetScopeMethod(_methodClass); int x = (mv.Width / 4 - 20) / 2; int y = (mv.Height / 4 - 20) / 2; if (x < 30) { x = 30; } if (y < 30) { y = 30; } mv.AddNewAction(act, new Point(x, y)); } }
private void companyDataGridView_RowLeave(object sender, DataGridViewCellEventArgs e) { Cursor = Cursors.WaitCursor; try { if (companyDataGridView.Rows.Count > 0) { if (companyDataGridView.IsCurrentRowDirty) { this.Validate(); companyBindingSource.EndEdit(); int iResult = ActionClass.SaveCompany((Company)companyBindingSource.Current); if (iResult > 0) { Console.WriteLine(iResult.ToString()); toolStripStatusLabel1.Text = "Saved."; Thread.Sleep(500); companyBindingSource.DataSource = ActionClass.FillCompanies(); } } } toolStripStatusLabel1.Text = "Ready..."; } catch (Exception ex) { MessageBox.Show("Error - " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); toolStripStatusLabel1.Text = "Error - " + ex.Message + ". Please refer to system administrator."; //throw; } Cursor = Cursors.Default; }
/// <summary> /// Returns a new instance of a battle action class based on an enum /// </summary> /// <param name="action">The action to get</param> /// <param name="user">The user to initialize it with</param> /// <returns>A new instance of a battle action</returns> public static BattleAction GetBattleAction(ActionClass action, BaseBattleDriver user) { switch (action) { case ActionClass.AOEHeal: return(new AOEHeal(user)); case ActionClass.Bravery: return(new Bravery(user)); case ActionClass.FireMagic: return(new FireMagic(user)); case ActionClass.MajorHeal: return(new MajorHeal(user)); case ActionClass.MinorHeal: return(new MinorHeal(user)); case ActionClass.Smash: return(new Smash(user)); case ActionClass.QuickSlash: return(new QuickSlash(user)); case ActionClass.NoAction: return(new NoAction(user)); default: // Default to smash return(new Smash(user)); } }
public Action(DateTime startTime, DateTime endTime, String action, ActionClass actionClass) { this.StartTime = startTime; this.EndTime = endTime; this.CarriedAction = action; this.ActionClass = actionClass; }
public void Register <T>(string key, Action <T> action) { ActionClass <T> actionClass = new ActionClass <T>(); actionClass.action = action; _MessageTCollection.Add(key, actionClass); }
private void departmentDataGridView_RowLeave(object sender, DataGridViewCellEventArgs e) { Cursor = Cursors.WaitCursor; try { if (departmentDataGridView.Rows.Count > 0) { if (departmentDataGridView.IsCurrentRowDirty == true) { this.Validate(); ((Department)departmentBindingSource.Current).EditedBy = SUserName; ((Department)departmentBindingSource.Current).EditedOn = DateTime.Now; departmentBindingSource.EndEdit(); int iResult = ActionClass.SaveDepartment((Department)departmentBindingSource.Current); if (iResult > 0) { Console.WriteLine(iResult.ToString()); toolStripStatusLabel1.Text = "Saved."; departmentBindingSource.DataSource = ActionClass.FillDepartments(); Thread.Sleep(500); } } } toolStripStatusLabel1.Text = "Ready..."; } catch (Exception ex) { MessageBox.Show("Error - " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); toolStripStatusLabel1.Text = "Error - " + ex.Message + ". Please refer to system administrator."; //throw; } Cursor = Cursors.Default; }
public async Task OnTurn(ITurnContext context, MiddlewareSet.NextDelegate next) { Fired = false; if (context.Activity.Text != null) { var w = context.Activity.Text.Split(' ', ',', '-', '.', '!', '(', ')').Select(x => x.Trim()) .Where(x => x.Length > 0); foreach (var x in ActionClass.GetType().GetMethods()) { var A = x.GetCustomAttributes(typeof(KeywordAttribute), false); if (A != null) { foreach (var t in A) { if (w.Contains(((KeywordAttribute)t).Text)) { // UserState<KGBState>.Get(context).AV.Add(((KeywordAttribute)t).Text, "1"); await(Task) x.Invoke(ActionClass, new object[] { context }); Fired = true; } } } } } await next(); }
private void buttonOk_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; IsDuplicateList(); //check for duplicates on machine logs if (lMac.Count > 0) { this.Validate(); ((MachineInstance)machineInstanceBindingSource.Current).EditedBy = SUserName; ((MachineInstance)machineInstanceBindingSource.Current).EditedOn = DateTime.Now; machineInstanceBindingSource.EndEdit(); int iResult = ActionClass.SaveMachineInstance((MachineInstance)machineInstanceBindingSource.Current); if (iResult > 0) { SaveLogsToDbase(iResult); buttonOk.Enabled = false; } else { UtilityClass.GetMessageBox(0); } } else { label1.Text = @"Record already exists."; } Cursor.Current = Cursors.Default; }
private void IsDuplicateList() { var lMacDB = ActionClass.FillMachinesAll(); foreach (var log in lLogs) { var mac = lMacDB.FirstOrDefault(ma => (ma.IYear == log.IYear) && (ma.IMonth == log.IMonth) && (ma.IDay == log.IDay) && (ma.IHour == log.IHour) && (ma.IMin == log.IMin) && (ma.ISecond == log.ISecond)); if (mac == null) { var m = new Machine(); //m.MachineInsId = iMacInstanceId; m.EnrolleeNo = log.EnrolleeNo; m.MachineNo = log.MachineNo; m.IYear = log.IYear; m.IMonth = log.IMonth; m.IDay = log.IDay; m.IHour = log.IHour; m.IMin = log.IMin; m.ISecond = log.ISecond; m.InOutCode = log.InOutCode; m.VerifyCode = log.VerifyCode; lMac.Add(m); } } }
private void machineInstanceBindingSource_CurrentChanged(object sender, EventArgs e) { if (machineInstanceBindingSource.Current != null) { machinesBindingSource.DataSource = ActionClass.FillMachinesViaEnrollMachineInstance(((MachineInstance)machineInstanceBindingSource.Current).MachineInsId); } }
public async Task OnTurn(ITurnContext context, MiddlewareSet.NextDelegate next) { Fired = false; var q = System.Web.HttpUtility.UrlEncode(context.Activity.Text); var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + ApiKey); string res; res = await http.GetStringAsync("https://api.dialogflow.com/v1/query?sessionId=1&lang=ru&v=20150910&query=" + q); dynamic jres = Newtonsoft.Json.JsonConvert.DeserializeObject(res); if (ActionClass != null) { foreach (var x in ActionClass.GetType().GetMethods()) { var A = x.GetCustomAttributes(typeof(EntityAttribute), false); if (A != null) { foreach (var t in A) { var val = jres.result.parameters[((EntityAttribute)t).EntityName]; if (val != null) { await(Task) x.Invoke(ActionClass, new object[] { context, val }); } } } } } await next(); }
private void dataGridView1_RowLeave(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.Rows.Count > 0) { if (dataGridView1.IsCurrentRowDirty) { this.Validate(); ((DTR)dTRsBindingSource.Current).IsSource = true; ((DTR)dTRsBindingSource.Current).EditedBy = SUserName; ((DTR)dTRsBindingSource.Current).EditedOn = DateTime.Now; ((DTR)dTRsBindingSource.Current).EnrolleeId = ((JEnrollee)listBoxEnrollees.SelectedItem).EnrolleeId; ((DTR)dTRsBindingSource.Current).EnrolleeNo = ((JEnrollee)listBoxEnrollees.SelectedItem).EnrolleeNo; dTRsBindingSource.EndEdit(); int iResult = ActionClass.SaveDTR((DTR)dTRsBindingSource.Current); if (iResult > 0) { Console.WriteLine(@"Save DTR."); } else { Console.WriteLine(@"Error DTR."); } } } }
public void OnObjectNameChanged(INonHostedObject obj) { _eventPath.OnObjectNameChanged(obj); ActionClass act = obj as ActionClass; if (act != null) { for (int i = 0; i < listBoxActions.Items.Count; i++) { ActionClass a = listBoxActions.Items[i] as ActionClass; if (a != null) { if (a.ActionId == act.ActionId) { listBoxActions.Items.RemoveAt(i); listBoxActions.Items.Insert(i, act); } } else { TaskID tid = listBoxActions.Items[i] as TaskID; if (tid != null) { if (tid.ActionId == act.ActionId && tid.ClassId == act.ClassId) { listBoxActions.Items.RemoveAt(i); listBoxActions.Items.Insert(i, tid); } } } } } }
private bool IsDuplicate(out string sEName) { string sTempName = string.Empty; bool bResult = false; if (enrolleeBindingSource.Current != null) { try { if ((enrolleeNoTextBox.Text.Trim().Length > 0) && (enrolleeIdNoTextBox.Text.Trim().Length > 0)) { if (enrolleeBindingSource != null) { Enrollee e = ActionClass.GetEnrolleeViaEnrollNo(Convert.ToInt32(enrolleeNoTextBox.Text.Trim()), enrolleeIdNoTextBox.Text.Trim(), ((Enrollee)enrolleeBindingSource.Current). EnrolleeId); if (e != null) { sTempName = e.LastName.Trim().ToUpper() + ", " + e.FirstName.Trim() + " " + e.MiddleName.Substring(0, 1) + "."; bResult = true; } } } } catch (Exception ex) { Console.WriteLine("Error - " + ex.Message); //throw; } } sEName = sTempName; return(bResult); }
private void toolStripButtonDeleteDTR_Click(object sender, EventArgs e) { if (IsUser) { int iEnrolleeId = ((JEnrollee)listBoxEnrollees.SelectedItem).EnrolleeId; if (iEnrolleeId > 0) { DialogResult dResult = UtilityClass.GetDeleteDialog("DTR"); if (dResult == DialogResult.Yes) { if (ActionClass.DeleteDTR(iEnrolleeId, iMonth, iYear)) { MessageBox.Show("Record(s) were successfully deleted. Click OK buttong to load Blank DTR.", "Delete", MessageBoxButtons.OK, MessageBoxIcon.Information); LoadDRTEnrolleeId(); } } } } else { MessageBox.Show("You have are not permitted to perform this operation.", "Delete", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }
private void AddAction(int startTime, int endTime, String ActionInfo, ActionClass actionClass) { actionsToAdd.Add( new Progetto.Action(UtilityFunctions.GetRealTime(startTime + this.pktOffset), UtilityFunctions.GetRealTime(endTime + this.pktOffset), ActionInfo, actionClass)); }
private void LoadDRTEnrolleeId() { Cursor = Cursors.WaitCursor; if (listBoxEnrollees.Items.Count > 0) { textBoxName.Text = listBoxEnrollees.Text; iMonth = toolStripComboBoxMonth.SelectedIndex + 1; iYear = int.Parse(toolStripComboBoxDuration.Text); textBoxDepartment.Text = GetEnrolleeDepartment(); textBoxPosition.Text = GetEnrolleePosition(); Miscellaneous misc = ActionClass.FillMiscellaneous().FirstOrDefault(mi => mi.MiscActive == true); int iEnrolleeId = ((JEnrollee)listBoxEnrollees.SelectedItem).EnrolleeId; Enrollee enrollee = ActionClass.GetEnrollee(iEnrolleeId); lDTRSource = DataManagementClass.LoadDTRViaDTR(enrollee, iMonth, iYear, ActionClass.FillDTRs(iEnrolleeId), misc); dTRsBindingSource.DataSource = lDTRSource; ExecuteSaveDTRThread(); // loop to save dtr. MarkUnderOverTimeHours(); } Cursor = Cursors.Default; }
public void DoNextAction() { Debug.Log(" == DoNextAction " + ActionCurrent); if (ActionsNumber > ActionCurrent) { ActionClass[] actions = ActionStack.ToArray(); ActionClass action = actions[ActionCurrent]; ActionCurrent++; if (action.ActionType == ActionTypeEnum.attack) { GamePlayComponent.ShowAttackAnimation( action.myPawn, action.enemyPawn, action.myPawnParam, action.enemyPawnParam, action.attackDirection, true, false ); } else if (action.ActionType == ActionTypeEnum.attackAndCounter) { GamePlayComponent.ShowAttackAnimation( action.myPawn, action.enemyPawn, action.myPawnParam, action.enemyPawnParam, action.attackDirection, true, true ); } else if (action.ActionType == ActionTypeEnum.death) { GamePlayComponent.ShowKillPawnAnimation( action.myPawn ); } else if (action.ActionType == ActionTypeEnum.win) { GamePlayComponent.EndGame(true); } else if (action.ActionType == ActionTypeEnum.defeat) { GamePlayComponent.EndGame(false); } else { Debug.LogError("Unsupported action animation type: " + action.ActionType); } } else { ActionStack.Clear(); ActionCurrent = 0; ActionsNumber = 0; ActionStarted = false; } }
private void toolStripButtonRefresh_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; var listEnrollees = new JSortingListClass <Enrollee>(ActionClass.FillEnrollees()); enrolleeBindingSource.DataSource = listEnrollees; Cursor.Current = Cursors.Default; }
private void button1_Click(object sender, EventArgs e) { ReportParameter p1 = new ReportParameter("CompanyNamez", SCompanyName); this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { p1 }); HolidayBindingSource.DataSource = ActionClass.FillHolidays(); this.reportViewer1.RefreshReport(); }
private void AddAction(ActionTypeEnum actionType) { ActionsNumber++; ActionClass action = new ActionClass(); action.ActionType = actionType; ActionStack.Add(action); }
public static ActionClass CreateActionClass(string dataAreaId, string executableClass) { ActionClass actionClass = new ActionClass(); actionClass.dataAreaId = dataAreaId; actionClass.ExecutableClass = executableClass; return(actionClass); }
public static void Main(string[] args) { var objMario = new Mario(); var objContra = new Contra(); ActionClass.DoWork(objMario); }
public void Send <T>(string key, T para) { if (_MessageTCollection.Keys.Contains(key)) { ActionClass <T> actionClass = (ActionClass <T>)_MessageTCollection[key]; actionClass.action.Invoke(para); } }
private void toolStripButtonGo_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; if (toolStripTextBox1.Text.Length > 0) { enrolleeBindingSource.DataSource = ActionClass.FillEnrollees(toolStripTextBox1.Text.Trim(), toolStripTextBox1.Text.Trim(), toolStripTextBox1.Text.Trim()); } Cursor.Current = Cursors.Default; }
public virtual void OnPostSerialize(ObjectIDmap objMap, XmlNode objectNode, bool saved, object serializer) { if (BaseClassType != null) { if (BaseClassType.IsGenericParameter || BaseClassType.IsGenericType) { XmlObjectReader xr = serializer as XmlObjectReader; if (xr != null) { if (xr.ObjectStack.Count > 0) { DataTypePointer dp = null; IEnumerator ie = xr.ObjectStack.GetEnumerator(); while (ie.MoveNext()) { if (ie.Current != this) { ActionClass act = ie.Current as ActionClass; if (act != null) { dp = act.GetConcreteType(this.BaseClassType); if (dp != null) { break; } } else { MethodClass mc = ie.Current as MethodClass; if (mc != null) { dp = mc.GetConcreteType(this.BaseClassType); if (dp != null) { break; } } } } } if (dp != null) { if (BaseClassType.IsGenericParameter) { _type.SetConcreteType(dp); } else { _type.TypeParameters = dp.TypeParameters; } } } } } } }
public bool IsSameObjectRef(IObjectIdentity objectIdentity) { ActionClass ac = objectIdentity as ActionClass; if (ac != null) { return(ac.ClassId == this.ClassId && ac.ActionId == this.ActionId); } return(false); }
public void setAction() { foreach (var item in GameManager.instance.actionsList) { if (actionName == item.name) { action = item; } } }
public void ChangeAction(ActionClass.act[] actions, ActionClass.act action, int ch) { actions [ch] = action; }
public int AddAction(ActionClass.act[] actions, ActionClass.act action, int numb) { actions [numb] = action; numb++; return numb; }
public int DeleteAction(ActionClass.act[] actions, int del, int numb) { for (int i=del+1;i<numb;i++) actions[i-1]=actions[i]; numb--; return numb; }
public int DoActions(ActionClass.act[] actions, int numb) { ActionTypes actTypes = GetComponent<ActionTypes> (); InfoGetTypes infTypes = GetComponent<InfoGetTypes> (); clavisher clavi = GetComponent<clavisher> (); int j; for (int i=0;i<numb;i++) { if (actions[i].actType==1) { if (actions[i].actNumb==1) actTypes.AchieveSpeedX(actions[i].OBJ[0].rigidbody2D, actions[i].OBJ[0].GetComponent<Stats>(), ChooseDirection(clavi.buttons[actions[i].PRM[2]],clavi.buttons[actions[i].PRM[3]])*actions[i].PRM[0], actions[i].PRM[1]); else if (actions[i].actNumb==2) actTypes.AchieveSpeedY(actions[i].OBJ[0].rigidbody2D, actions[i].OBJ[0].GetComponent<Stats>(), ChooseDirection(clavi.buttons[actions[i].PRM[2]],clavi.buttons[actions[i].PRM[3]])*actions[i].PRM[0], actions[i].PRM[1]); else if (actions[i].actNumb==3) actTypes.AchieveSpeed(actions[i].OBJ[0].rigidbody2D, actions[i].OBJ[0].GetComponent<Stats>(), ChooseDirection(clavi.buttons[actions[i].PRM[2]],clavi.buttons[actions[i].PRM[3]])*actions[i].PRM[0], ChooseDirection(clavi.buttons[actions[i].PRM[4]],clavi.buttons[actions[i].PRM[5]])*actions[i].PRM[0], actions[i].PRM[1]); else if (actions[i].actNumb==4) actTypes.SetVeloc(actions[i].OBJ[0].rigidbody2D, new Vector2(actions[i].OBJ[0].GetComponent<Stats>().direction*actions[i].PRM[0]*1f, actions[i].PRM[1]*1f)); else if (actions[i].actNumb==5) actTypes.Forcing(actions[i].OBJ[0].rigidbody2D, new Vector2(ChooseDirection(clavi.buttons[actions[i].PRM[2]], clavi.buttons[actions[i].PRM[3]])*actions[i].PRM[0]*1f, actions[i].PRM[1]*1f), this); else if (actions[i].actNumb==6) { actTypes.Climb(actions[i].OBJ[0].rigidbody2D, actions[i].OBJ[0].GetComponent<Stats>(), infTypes, actions[i].OBJ[0].GetComponent<InfoGets>(), actions[i].PRM[6], ChooseDirection(clavi.buttons[actions[i].PRM[2]], clavi.buttons[actions[i].PRM[3]])*actions[i].PRM[0], ChooseDirection(clavi.buttons[actions[i].PRM[4]], clavi.buttons[actions[i].PRM[5]])*actions[i].PRM[1], this); k1++; } else if (actions[i].actNumb==7) actTypes.MoveToClimb(actions[i].OBJ[0].rigidbody2D, actions[i].OBJ[0].GetComponent<Stats>(), actions[i].OBJ[0].GetComponent<InfoGets>(), actions[i].PRM[0], this); } else if (actions[i].actType==0) { if (actions[i].actNumb==1) { actTypes.ChangeLocation(actions[i].OBJ[0].transform, actions[i].OBJ[1].transform, new Vector3(actions[i].PRM[0]*1f, actions[i].PRM[1]*1f, actions[i].PRM[2]*1f)); } else if (actions[i].actNumb==2) { actTypes.ChangeLocationSmoothly(actions[i].OBJ[0].transform, actions[i].OBJ[1].transform, new Vector3(actions[i].PRM[0]*1f, actions[i].PRM[1]*1f, actions[i].PRM[2]*1f), actions[i].PRM[3]); } else if (actions[i].actNumb==3) { actTypes.MakeBTrigger(actions[i].OBJ[0].GetComponent<BoxCollider2D>(), actions[i].PRM[0]); } else if (actions[i].actNumb==4) { actTypes.MakeCTrigger(actions[i].OBJ[0].GetComponent<CircleCollider2D>(), actions[i].PRM[0]); } else if (actions[i].actNumb==5) { if (actions[i].OBJ[0].GetComponent<Indicator>()!=null) actTypes.MakeColAble(actions[i].OBJ[0].GetComponent<Indicator>(), actions[i].PRM[0]); else actTypes.MakeColAble(actions[i].OBJ[0].GetComponent<CircleCollider2D>(), actions[i].PRM[0]); } else if (actions[i].actNumb==6) { actTypes.MakeSizeOfCol(actions[i].OBJ[0].GetComponent<BoxCollider2D>(), actions[i].PRM[0]*1f/10f, actions[i].PRM[1]*1f/10f); } } else if (actions[i].actType==2) { /*if (actions[i].actNumb==1) actTypes.WeaponMove(actions[i].OBJ[0].GetComponent<Equipment>(), actions[i].OBJ[1].GetComponent<RootCharacterController>(), actions[i].OBJ[1].GetComponent<Stats>(), this, actions[i].PRM[0]==1); else */if (actions[i].actNumb==2) actTypes.WeaponHit(actions[i].OBJ[0].GetComponent<HitController>(), actions[i].PRM[0]*1f, actions[i].PRM[1]*1f, actions[i].PRM[2]*1f, actions[i].PRM[3]*1f, actions[i].PRM[4], actions[i].PRM[5]==1, actions[i].PRM[6]*0.1f, actions[i].PRM[7], actions[i].PRM[8], actions[i].PRM[9], actions[i].PRM[10]); else if (actions[i].actNumb==3) actTypes.WeaponPush(actions[i].OBJ[0].GetComponent<HitController>(),actions[i].OBJ[1].GetComponent<Rigidbody2D>(), actions[i].PRM[0]*1f, actions[i].PRM[1]*1f, actions[i].PRM[2]*1f, actions[i].PRM[3]*1f, actions[i].PRM[4], actions[i].PRM[5]==1, actions[i].PRM[6]*0.1f, actions[i].PRM[7], actions[i].PRM[8], actions[i].PRM[9], actions[i].PRM[10], new Vector2(ChooseDirection(clavi.buttons[actions[i].PRM[13]], clavi.buttons[actions[i].PRM[14]])*actions[i].PRM[11]*1f, actions[i].PRM[12]*1f)); else if (actions[i].actNumb==4) actTypes.Shoot(actions[i].PRM[0]*1f, actions[i].PRM[1]*1f, actions[i].PRM[2]*1f, actions[i].PRM[3]*1f, actions[i].PRM[4], actions[i].PRM[5]==1, actions[i].PRM[6]*0.1f, actions[i].PRM[7], actions[i].PRM[8], actions[i].OBJ[0].GetComponent<Equipment>().arrows, new Vector2(actions[i].PRM[9]*1f*actions[i].OBJ[0].GetComponent<Organism>().direction, actions[i].PRM[10]*1f), actions[i].OBJ[1].transform.position); } else if (actions[i].actType==3) { if (actions[i].actNumb==0) { if (actions[i].OBJ[0].GetComponent<Equipment>().rightWeapon!=null) actTypes.PrepareWeapon(actions[i].OBJ[0].GetComponent<Equipment>().rightWeapon, actions[i].OBJ[0].GetComponent<SmartObjectController>(), actions[i].PRM[0], (actions[i].PRM[1]==1)); if (actions[i].OBJ[0].GetComponent<Equipment>().leftWeapon!=null) actTypes.PrepareWeapon(actions[i].OBJ[0].GetComponent<Equipment>().leftWeapon, actions[i].OBJ[0].GetComponent<SmartObjectController>(), actions[i].PRM[0], (actions[i].PRM[1]==1)); } } else if (actions[i].actType==4) { if (actions[i].actNumb==0) actTypes.GravityOn(actions[i].OBJ[0].rigidbody2D, actions[i].PRM[0]*1f/10f, actions[i].PRM[1]==1); } else if (actions[i].actType==5) { if (actions[i].actNumb==0) { for (j=0;j<10;j++) if (clavi.buttons[j+12].push==3) break; if (actions[i].OBJ[0].GetComponent<Equipment>().bag.Count>=j) { if ((actions[i].OBJ[0].GetComponent<Equipment>().bag[j-1].GetComponent<ItemClass>().objects[0].GetComponent<WeaponClass>().handEmployment==2)|| (clavi.buttons[9].push==1)) { actTypes.ChangeWeapon(actions[i].OBJ[0].GetComponent<Equipment>(), j-1, true, actions[i].PRM[0], actions[i].PRM[1], this); clavi.buttons[j+12].push=0; clavi.buttons[j+12].timer=0; } else if (clavi.buttons[8].push==1) { actTypes.ChangeWeapon(actions[i].OBJ[0].GetComponent<Equipment>(), j-1, 1==0, actions[i].PRM[0], actions[i].PRM[1], this); clavi.buttons[j+12].push=0; clavi.buttons[j+12].timer=0; } } } } else if (actions[i].actType==6) { if (actions[i].actNumb==1) actTypes.Punchuntilground(actions[i].OBJ[0].GetComponent<PunchUntillGround>(), actions[i].OBJ[1].GetComponent<RootCharacterController>(), actions[i].OBJ[2].GetComponent<WeaponClass>(), actions[i].PRM[0],actions[i].PRM[1],actions[i].PRM[2],this, actions[i].OBJ[3].GetComponent<HitController>()); if (actions[i].actNumb==2) actTypes.Twodifferentweaponslock(actions[i].OBJ[0].GetComponent<TwoDifferentWeaponsLock>(), actions[i].OBJ[1].GetComponent<Equipment>(), actions[i].OBJ[2].GetComponent<WeaponClass>(), actions[i].OBJ[1].GetComponent<RootCharacterController>(), actions[i].PRM[0]); if (actions[i].actNumb==3) actTypes.Holdandunleash(actions[i].OBJ[0].GetComponent<HoldAndUnleash>(), actions[i].OBJ[1].GetComponent<RootCharacterController>(), actions[i].OBJ[2].GetComponent<WeaponClass>(), actions[i].PRM[0],actions[i].PRM[1],actions[i].PRM[2],actions[i].PRM[3],this, actions[i].OBJ[3].GetComponent<HitController>(), clavi); if (actions[i].actNumb==4) actTypes.Aimingshoot(actions[i].OBJ[0].GetComponent<AimingShoot>(), actions[i].OBJ[1].GetComponent<RootCharacterController>(), actions[i].OBJ[2].GetComponent<WeaponClass>(), actions[i].PRM[0],actions[i].PRM[1],actions[i].PRM[2],actions[i].PRM[3],actions[i].PRM[4], this,clavi, actions[i].OBJ[3].transform.position); if (actions[i].actNumb==5) actTypes.Punchuntiltarget(actions[i].OBJ[0].GetComponent<PunchUntilTarget>(), actions[i].OBJ[1].GetComponent<RootCharacterController>(), actions[i].OBJ[2].GetComponent<WeaponClass>(), actions[i].PRM[0],actions[i].PRM[1],actions[i].PRM[2],this, actions[i].OBJ[3].GetComponent<HitController>()); if (actions[i].actNumb==6) actTypes.Shieldcontroller(actions[i].OBJ[0].GetComponent<ShieldController>(), actions[i].OBJ[1].GetComponent<RootCharacterController>(), actions[i].OBJ[2].GetComponent<WeaponClass>(), actions[i].PRM[0],actions[i].PRM[1],actions[i].PRM[2],this, clavi); } else if (actions[i].actType==10) { actTypes.Experimental(); } } numb = 0; return numb; }