public UseSkillNotice() { eid = 0; skillID = 0; foe = 0; dst = new EPosition(); }
public UseSkillNotice(ulong eid, ulong skillID, ulong foe, EPosition dst) { this.eid = eid; this.skillID = skillID; this.foe = foe; this.dst = dst; }
private void CheckWhichPositionPlayerIs(Transform playerTransform) { // find the line from the center of the player to the center of the enemy // angle relative to player.transform.forward // 0-180 right, 180-360 left /* * // slope of player-enemy * float slopePE = (playerTransform.position.z - this.transform.position.z) / (playerTransform.position.x - this.transform.position.x); * float slopeEE = this.transform.forward.x == 0 ? 0f : (this.transform.forward.z) / (this.transform.forward.x); * float angle = Vector3.SignedAngle(this.transform.forward, new Vector3(playerTransform.position.x - this.transform.position.x, 0, playerTransform.position.z - this.transform.position.z), Vector3.up); * //Debug.Log($"Angle: {angle}, {this.transform.forward}"); * * // to the left of the enemy * if (angle <= 0) * { * gunToShoot = EPosition.Left; * } * // in front of the enemy * // to the right of the enemy * else if (angle > 0) * { * gunToShoot = EPosition.Right; * } * //Debug.Log($"Player is to the {gunToShoot} of enemy"); * // behind the enemy */ // Right now there are only forward missiles gunToShoot = EPosition.Front; }
/// <summary> /// Code to fetch article details and dimensions list from database by using WG WA combination /// </summary> /// <param name="ObjEPositon"></param> /// <returns></returns> public EPosition GetArticleByWGWA(EPosition ObjEPositon) { DataSet ds = new DataSet(); try { using (SqlCommand cmd = new SqlCommand()) { cmd.Connection = SQLCon.Sqlconn(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "[P_Get_WGWAComb]"; cmd.Parameters.AddWithValue("@WG", ObjEPositon.WG); cmd.Parameters.AddWithValue("@WA", ObjEPositon.WA); cmd.Parameters.AddWithValue("@ProjectID", ObjEPositon.ProjectID); using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { da.Fill(ds); } if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { ObjEPositon.dtArticle = ds.Tables[0]; } else { ObjEPositon.dtArticle.Rows.Clear(); } } } catch (Exception ex) { throw; } return(ObjEPositon); }
/// <summary> /// alternate method of set position method that uses a cdrawer instead of form app /// </summary> /// <param name="position"></param> /// <param name="drawer"></param> void SetPosition(EPosition position, CDrawer drawer) { Point local = drawer.Position;//pos of form switch (position) { case EPosition.eRight: local.X += drawer.ScaledWidth; break; case EPosition.eBelow: local.Y += drawer.ScaledHeight; break; case EPosition.eBelowRight: local.X += drawer.ScaledWidth; local.Y += drawer.ScaledHeight; break; case EPosition.eNone: local.X += drawer.ScaledWidth; break; default: break; } Position = local; }
protected void Repeater_ItemDataBound(object sender, DataListItemEventArgs e) { e.Item.FindControl("DeleteItem").Visible = IsAllowEdit; if (e.Item.ItemIndex == Repeater.EditItemIndex) { ebinding = new Binding(dbConn, db); ebinding.add((HtmlInputHidden)e.Item.FindControl("PositionID")); ebinding.add((TextBox)e.Item.FindControl("PositionCode")); ebinding.add((TextBox)e.Item.FindControl("PositionDesc")); ebinding.add((TextBox)e.Item.FindControl("PositionCapacity")); ebinding.init(Request, Session); EPosition obj = new EPosition(); db.toObject(((DataRowView)e.Item.DataItem).Row, obj); Hashtable values = new Hashtable(); db.populate(obj, values); ebinding.toControl(values); } else { e.Item.FindControl("Edit").Visible = IsAllowEdit; HtmlInputHidden h = (HtmlInputHidden)e.Item.FindControl("PositionID"); h.Value = ((DataRowView)e.Item.DataItem)["PositionID"].ToString(); } HROne.Common.WebUtility.WebControlsLocalization(Session, e.Item.Controls); }
public void SetPosition(EPosition position, Form form) { Point local = form.Location;//pos of form switch (position) { case EPosition.eRight: local.X += form.Width; break; case EPosition.eBelow: local.Y += form.Height; break; case EPosition.eBelowRight: local.X += form.Width; local.Y += form.Height; break; case EPosition.eNone: break; default: break; } Position = local; }
/// <summary> /// Creates an instance of ExtendedObjectFieldButton. /// </summary> /// <param name="_IconType">The type of icon to use for this button.</param> /// <param name="_Position">The expected position of the button when drawing the Extended Object Field.</param> /// <param name="_OnClick">The action to perform when the user clicks on the button.</param> /// <param name="_Enabled">Defines if this button is enabled.</param> public ExtendedObjectFieldButton(EEditorIcon _IconType, EPosition _Position, Action _OnClick, bool _Enabled = true) { icon = EditorIcons.FindIcon(_IconType); position = _Position; onClick = _OnClick; enabled = _Enabled; }
public Position Read(int positionId) { //throw new System.NotImplementedException(); EPosition ePosition = _iDPosition.Read <EPosition>(a => a.PositionId == positionId); return(Position(ePosition)); }
public Employee(String FirstName, String LastName, EPosition Position, String ManagersName) { _FirstName = FirstName; _LastName = LastName; _ManagersName = ManagersName; _Position = Position; }
/// <summary> /// set a cdrawer window with made enum and where the set form app postion is /// </summary> /// <param name="position"></param> /// <param name="form"></param> void SetPosition(EPosition position, Form form) { Point local = form.Location;//pos of form switch (position) { case EPosition.eRight: local.X += form.Width; break; case EPosition.eBelow: local.Y += form.Height; break; case EPosition.eBelowRight: local.X += form.Width; local.Y += form.Height; break; //this is would be the default postion (is same as right of from app postion) case EPosition.eNone: local.X += form.Width; break; default: break; } Position = local; }
/// <summary> /// Creates an instance of ExtendedObjectFieldButton. /// </summary> /// <param name="_Icon">The icon to use for this button.</param> /// <param name="_Position">The expected position of the button when drawing the Extended Object Field.</param> /// <param name="_OnClick">The action to perform when the user clicks on the button.</param> /// <param name="_Enabled">Defines if this button is enabled.</param> public ExtendedObjectFieldButton(Texture _Icon, EPosition _Position, Action _OnClick, bool _Enabled = true) { icon = _Icon; position = _Position; onClick = _OnClick; enabled = _Enabled; }
public Position Create(Position position) { EPosition ePosition = EPosition(position); ePosition = _iDPosition.Create(ePosition); return(Position(ePosition)); }
public UseSkillReq() { eid = 0; skillID = 0; foe = 0; dst = new EPosition(); }
private float TurnAwayFromPlayer() { float offset = 130f; if (setRunaway) { EPosition enemySide = this.GetComponent <EnemyShootGun>().CurrentGunBeingShot(); // if the enemy is to the left of the player if (enemySide == EPosition.Right) { return(Random.Range(playerFlyingComponent.desiredDir - offset % 360, playerFlyingComponent.desiredDir)); } // if the enemy is to the right of the player else if (enemySide == EPosition.Left) { return(Random.Range(playerFlyingComponent.desiredDir, playerFlyingComponent.desiredDir + offset % 360)); } else { return(enemyFlyingComponent.desiredDir); } } else { return(enemyFlyingComponent.desiredDir); } }
public UseSkillReq(ulong eid, ulong skillID, EPosition dst, ushort foeFirst) { this.eid = eid; this.skillID = skillID; this.dst = dst; this.foeFirst = foeFirst; }
public UseSkillResp(ushort retCode, ulong eid, ulong skillID, ulong foe, EPosition dst) { this.retCode = retCode; this.eid = eid; this.skillID = skillID; this.foe = foe; this.dst = dst; }
public MoveReq() { eid = 0; action = 0; clientPos = new EPosition(); waypoints = new EPositionArray(); follow = 0; }
/// <summary> /// Creates an instance of ExtendedObjectFieldButton. /// </summary> /// <param name="_IconName">The name of the icon to use for this button (from built-in resources).</param> /// <param name="_Position">The expected position of the button when drawing the Extended Object Field.</param> /// <param name="_Tooltip">The hovering tooltip to use for this button.</param> /// <param name="_OnClick">The action to perform when the user clicks on the button.</param> /// <param name="_Enabled">Defines if this button is enabled.</param> public ExtendedObjectFieldButton(string _IconName, EPosition _Position, string _Tooltip, Action _OnClick, bool _Enabled = true) { icon = EditorIcons.FindIcon(_IconName); position = _Position; tooltip = _Tooltip; onClick = _OnClick; enabled = _Enabled; }
public MoveReq(ulong eid, ushort action, EPosition clientPos, EPositionArray waypoints, ulong follow) { this.eid = eid; this.action = action; this.clientPos = clientPos; this.waypoints = waypoints; this.follow = follow; }
public UseSkillResp() { retCode = 0; eid = 0; skillID = 0; foe = 0; dst = new EPosition(); }
protected DataTable loadExtraData(DataTable sourceTable) { DataTable destTable = sourceTable.Copy(); destTable.Columns.Add("CompanyCode", typeof(string)); destTable.Columns.Add("BusinessHierarchy", typeof(string)); destTable.Columns.Add("PositionCode", typeof(string)); destTable.Columns.Add("RankCode", typeof(string)); destTable.Columns.Add("StaffTypeCode", typeof(string)); destTable.Columns.Add("LeavePlanCode", typeof(string)); destTable.Columns.Add("PayGroupCode", typeof(string)); foreach (DataRow row in destTable.Rows) { EEmpPositionInfo empPos = EEmpPositionInfo.GetObject(dbConn, row["EmpPosID"]); if (empPos != null) { ECompany company = ECompany.GetObject(dbConn, row["CompanyID"]); if (company != null) { row["CompanyCode"] = company.CompanyCode; } row["BusinessHierarchy"] = empPos.GetBusinessHierarchyString(dbConn); EPosition position = EPosition.GetObject(dbConn, row["PositionID"]); if (position != null) { row["PositionCode"] = position.PositionCode; } ERank rank = ERank.GetObject(dbConn, row["RankID"]); if (rank != null) { row["RankCode"] = rank.RankCode; } EStaffType staffType = EStaffType.GetObject(dbConn, row["StaffTypeID"]); if (staffType != null) { row["StaffTypeCode"] = staffType.StaffTypeCode; } ELeavePlan leavePlan = ELeavePlan.GetObject(dbConn, row["LeavePlanID"]); if (leavePlan != null) { row["LeavePlanCode"] = leavePlan.LeavePlanCode; } EPayrollGroup payGroup = EPayrollGroup.GetObject(dbConn, (int)row["PayGroupID"]); if (payGroup != null) { row["PayGroupCode"] = payGroup.PayGroupCode; } } } return(destTable); }
/// <summary> /// Creates an instance of ExtendedObjectFieldButton. /// </summary> /// <param name="_Icon">The icon to use for this button.</param> /// <param name="_Position">The expected position of the button when drawing the Extended Object Field.</param> /// <param name="_Text">The text to use for this button.</param> /// <param name="_Tooltip">The hovering tooltip to use for this button.</param> /// <param name="_OnClick">The action to perform when the user clicks on the button.</param> /// <param name="_Enabled">Defines if this button is enabled.</param> public ExtendedObjectFieldButton(Texture _Icon, EPosition _Position, string _Text, string _Tooltip, Action _OnClick, bool _Enabled = true) { icon = _Icon; position = _Position; text = _Text; tooltip = _Tooltip; onClick = _OnClick; enabled = _Enabled; }
public CmdTargetAppear(int targetId, bool isBlush, EFace face, ECostume costume, EPosition pos) : base(Command.Type.TargetAppear) { _targetId = targetId; _isBlush = isBlush; _face = face; _costume = costume; _position = pos; }
public frmAddProjectArticles(EPosition _ObjEPosition) { InitializeComponent(); ObjEPosition = _ObjEPosition; txtWG.Text = ObjEPosition.WG; txtWA.Text = ObjEPosition.WA; txtWG.Enabled = false; txtWA.Enabled = false; }
public int __decode(byte[] binData, ref int pos) { this.eid = Proto4z.BaseProtoObject.decodeUI64(binData, ref pos); this.skillID = Proto4z.BaseProtoObject.decodeUI64(binData, ref pos); this.foe = Proto4z.BaseProtoObject.decodeUI64(binData, ref pos); this.dst = new EPosition(); this.dst.__decode(binData, ref pos); return(pos); }
/// <summary> /// Creates an instance of ExtendedObjectFieldButton. /// </summary> /// <param name="_Content">The content (icon, tooltip and text) to use for this button.</param> /// <param name="_Position">The expected position of the button when drawing the Extended Object Field.</param> /// <param name="_OnClick">The action to perform when the user clicks on the button.</param> /// <param name="_Enabled">Defines if this button is enabled.</param> public ExtendedObjectFieldButton(GUIContent _Content, EPosition _Position, Action _OnClick, bool _Enabled = true) { icon = _Content.image; tooltip = _Content.tooltip; text = _Content.text; onClick = _OnClick; position = _Position; enabled = _Enabled; }
/// <summary> /// Code to Copy a Position from Copy LVs modules /// </summary> /// <param name="ObjEPosition"></param> /// <param name="stOZChar"></param> /// <returns></returns> public int CopyPosition(EPosition ObjEPosition, string stOZChar) { int ProjectID = -1; try { using (SqlCommand cmd = new SqlCommand()) { cmd.Connection = SQLCon.Sqlconn(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "[P_Ins_CopyPosition]"; cmd.Parameters.AddWithValue("@ProjectID", ObjEPosition.ProjectID); cmd.Parameters.AddWithValue("@ParentID", ObjEPosition.ParentID); cmd.Parameters.AddWithValue("@PositionOZ", ObjEPosition.Position_OZ); cmd.Parameters.AddWithValue("@SNO", ObjEPosition.SNO); cmd.Parameters.AddWithValue("@dtCopyPosition", ObjEPosition.dtCopyPosition); cmd.Parameters.AddWithValue("@OZID", ObjEPosition.OZID); cmd.Parameters.AddWithValue("@OZChar", stOZChar); object returnObj = cmd.ExecuteScalar(); if (!int.TryParse(Convert.ToString(returnObj), out ProjectID)) { throw new Exception(Convert.ToString(returnObj)); } } } catch (Exception ex) { if (ex.Message.Contains("UNIQUE")) { if (System.Threading.Thread.CurrentThread.CurrentCulture.Name.ToString() == "de-DE") { throw new Exception("Diese Ordnungskennzahl existiert bereits"); } else { throw new Exception("OZ Already Exists"); } } else { if (System.Threading.Thread.CurrentThread.CurrentCulture.Name.ToString() == "de-DE") { throw new Exception("Fehler beim Verschieben der Position"); } else { throw new Exception("Error While Moving the position"); } } } finally { SQLCon.Close(); } return(ProjectID); }
public ulong follow; //eid public EntityMove() { eid = 0; position = new EPosition(); action = 0; realSpeed = 0.0; expectSpeed = 0.0; waypoints = new EPositionArray(); follow = 0; }
public EntityMove(ulong eid, EPosition position, ushort action, double realSpeed, double expectSpeed, EPositionArray waypoints, ulong follow) { this.eid = eid; this.position = position; this.action = action; this.realSpeed = realSpeed; this.expectSpeed = expectSpeed; this.waypoints = waypoints; this.follow = follow; }
public Position Create(Position position) { //var ePosition = _iDPosition.Create(EPosition(position)); //return (Position(ePosition)); EPosition ePosition = EPosition(position); ePosition = _iDPosition.Create(ePosition); return(Position(ePosition)); }
public void displayGame(string[][] gameTable, int indexLine, int indexCol, int indexCurrentLine, EPosition[][] TrackPosition) { for (int i = 0; i < indexLine; i++) { for (int y = 0, col = 0; y < indexCol; y++, col++) { Console.Write(" "+gameTable[i][y]); } Console.WriteLine("\n\n"); } }
public Boolean AddNewEmployee(String FirstName, String LastName, EPosition Position, String ManagersName) { return false; }
/*-------------------[ Display table game ]--------------*/ public void displayGame(string[][] gameTable, int indexLine, int indexCol, int indexCurrentLine, EPosition[][] TrackPosition) { Display.displayGame(gameTable, indexLine, indexCol, indexCurrentLine, TrackPosition); }
public void displayGame(string[][] gameTable, int indexLine, int indexCol, int indexCurrentLine, EPosition[][] TrackPosition) { gvMain.Children.Clear(); gvMain.RowDefinitions.Clear(); gvMain.ColumnDefinitions.Clear(); gvMain.HorizontalAlignment = HorizontalAlignment.Left; gvMain.VerticalAlignment = VerticalAlignment.Top; gvMain.Background = new SolidColorBrush(Colors.PaleVioletRed); for (int i = 0; i < indexLine; i++) { var rowdef = new RowDefinition(); rowdef.Height = new GridLength(gvMain.Height / indexLine); gvMain.RowDefinitions.Add(rowdef); } for (int i = 0; i < indexCol; i++) { var coldef = new ColumnDefinition(); coldef.Width = new GridLength(gvMain.Width / indexCol); gvMain.ColumnDefinitions.Add(coldef); } for (int i = 0, line = 0; i < indexLine; i++) { for (int y = 0, col = 0; y < indexCol; y++, col++) { var btn = new Button(); btn.HorizontalContentAlignment = HorizontalAlignment.Center; btn.VerticalContentAlignment = VerticalAlignment.Center; btn.Name = "_" + i + "" + y; btn.FontSize = 15; btn.Content = gameTable[i][y]; Grid.SetColumn(btn, col); Grid.SetRow(btn, line); if (TrackPosition[i][y].Equals(EPosition.GoodPosition)) { btn.Background = new SolidColorBrush(Colors.Green); btn.ToolTip = "Good Position"; } else if (TrackPosition[i][y].Equals(EPosition.BadPosition)) { btn.Background = new SolidColorBrush(Colors.Orange); btn.ToolTip = "Wrong Position"; } else if (indexCurrentLine > 0 && line <= indexCurrentLine - 1 && TrackPosition[i][y].Equals(EPosition.NotInWord)) { btn.Background = new SolidColorBrush(Colors.Red); btn.ToolTip = "No Match"; } else { btn.Background = new SolidColorBrush(Colors.Ivory); } if (i == indexCurrentLine) { Storyboard myStoryBord = new Storyboard(); DoubleAnimation myDoubleAnimationFadeIn = new DoubleAnimation(); myDoubleAnimationFadeIn.From = 0.0; myDoubleAnimationFadeIn.To = 1.0; myDoubleAnimationFadeIn.Duration = new Duration(TimeSpan.FromSeconds(3)); myDoubleAnimationFadeIn.AutoReverse = true; myDoubleAnimationFadeIn.RepeatBehavior = RepeatBehavior.Forever; DoubleAnimation myDoubleAnimationFadeOut = new DoubleAnimation(); myDoubleAnimationFadeOut.From = 1.0; myDoubleAnimationFadeOut.To = 0.0; myDoubleAnimationFadeOut.BeginTime = TimeSpan.FromSeconds(3); myDoubleAnimationFadeOut.AutoReverse = true; myDoubleAnimationFadeOut.RepeatBehavior = RepeatBehavior.Forever; myStoryBord.Children.Add(myDoubleAnimationFadeIn); Storyboard.SetTarget(myDoubleAnimationFadeIn, btn); Storyboard.SetTargetProperty(myDoubleAnimationFadeIn, new PropertyPath("Opacity", 0.7)); myStoryBord.Begin(btn); myStoryBord.Children.Add(myDoubleAnimationFadeOut); Storyboard.SetTargetName(myDoubleAnimationFadeOut, btn.Name); Storyboard.SetTargetProperty(myDoubleAnimationFadeOut, new PropertyPath("Opacity", 0)); } gvMain.Children.Add(btn); if (col == indexCol -1) { col = 0; line++; } if (line == indexLine) { line = 0; } } } }
public string[][] convertStringToEmptyArrayOfUnderscore() { string[][] StringTab = new string[IndexLine][]; for (int i = 0; i < IndexLine; i++) { StringTab[i] = convertStringIntoTableOfString(Word); TrackPosition[i] = new EPosition[IndexColumn]; for (int y = 0; y < IndexColumn; y++) { if (y == 0) { StringTab[i][y] = Word[0].ToString(); } else if (y % 3 == 0) { StringTab[i][y] = Word[y].ToString(); } else { StringTab[i][y] = "_"; } TrackPosition[i][y] = EPosition.NotInWord; } } return StringTab; }
public void init() { IndexColumn = Word.Length; Game = new string[IndexLine][]; TrackPosition = new EPosition[IndexLine][]; Game = convertStringToEmptyArrayOfUnderscore(); Error = ""; IndexCurrentLine = 0; }
private void CastE(Obj_AI_Base target) { // TODO check possible wall dashes :^) if (!Variables.Spell[Variables.Spells.E].IsReady() || !getCheckBoxItem(MenuGenerator.comboOptions, "com.ilucian.combo.e") || target == null || ObjectManager.Player.HasBuff("LucianR")) { return; } var dashRange = getSliderItem(MenuGenerator.comboOptions, "com.ilucian.combo.eRange"); switch (getBoxItem(MenuGenerator.comboOptions, "com.ilucian.combo.eMode")) { case 0: // kite var hypotheticalPosition = ObjectManager.Player.ServerPosition.LSExtend( Game.CursorPos, Variables.Spell[Variables.Spells.E].Range); if (ObjectManager.Player.HealthPercent <= 70 && target.HealthPercent >= ObjectManager.Player.HealthPercent) { if (ObjectManager.Player.Position.LSDistance(ObjectManager.Player.ServerPosition) >= 35 && target.LSDistance(ObjectManager.Player.ServerPosition) < target.LSDistance(ObjectManager.Player.Position) && hypotheticalPosition.IsSafe(Variables.Spell[Variables.Spells.E].Range)) { Variables.Spell[Variables.Spells.E].Cast(hypotheticalPosition); } } if (hypotheticalPosition.IsSafe(Variables.Spell[Variables.Spells.E].Range) && hypotheticalPosition.LSDistance(target.ServerPosition) <= Orbwalking.GetRealAutoAttackRange(null) && (hypotheticalPosition.LSDistance(target.ServerPosition) > 400) && !Variables.HasPassive()) { Variables.Spell[Variables.Spells.E].Cast(hypotheticalPosition); } break; case 1: // side Variables.Spell[Variables.Spells.E].Cast( Deviation(ObjectManager.Player.Position.LSTo2D(), target.Position.LSTo2D(), dashRange).To3D()); break; case 2: // Cursor if (Game.CursorPos.IsSafe(475)) { Variables.Spell[Variables.Spells.E].Cast( ObjectManager.Player.Position.LSExtend(Game.CursorPos, dashRange)); } break; case 3: // Enemy Variables.Spell[Variables.Spells.E].Cast( ObjectManager.Player.Position.LSExtend(target.Position, dashRange)); break; case 4: Variables.Spell[Variables.Spells.E].Cast( Deviation(ObjectManager.Player.Position.LSTo2D(), target.Position.LSTo2D(), 65f).To3D()); break; case 5: // Smart E Credits to ASUNOOO var ePosition = new EPosition(); var bestPosition = ePosition.GetEPosition(); if (bestPosition != Vector3.Zero && bestPosition.LSDistance(target.ServerPosition) < Orbwalking.GetRealAutoAttackRange(target)) { Variables.Spell[Variables.Spells.E].Cast(bestPosition); } break; } }