public DocsShowClientService() { InitializeComponent(); var path = "clientSettings.json"; _logger.Info($"A kliens beállítások kiolvasása a {path} fájlból"); if (System.IO.File.Exists(path)) { try { _logger.Debug($"A {path} fájl beolvasása..."); var lines = System.IO.File.ReadAllText(path); _logger.Debug($"A {path} fájl beolvasása kész"); _logger.Debug($"A {path} fájl lefordítása objektumá..."); var settings = new JavaScriptSerializer().Deserialize <ClientSettings>(lines); _logger.Debug($"A {path} fájl lefordítása objektumá kész"); _logger.Debug($"A kliens adatok paramétereinek incializálása..."); //a szükséges paraméterek betöltése InItClientProgram.InitMainProgram.SetUpParams(settings); _logger.Debug($"A kliens adatok paramétereinek incializálása kész"); } catch (Exception ex) { _logger.Fatal($"Hiba történt a kliens adatok beolvasása közben a {path} fájlnál", ex); } //az összes adobe process bezárása Positioning.CloseAllAdobeProcess(); } }
public static MODE CreateModeForLowLevelEmitter(LoopMode l, Positioning p, LoadType t) { MODE mode = MODE.DEFAULT; mode |= ModeFromLoop(l) | ModeFromPosition(p) | ModeFromLoadType(t); return(mode); }
void activateButtons() { canPlace = false; BlockHover.hideGrid(); BlockHover.hideRampGrid(); Positioning.showButtons(); }
public static MODE ModeFromPosition(Positioning pos) { MODE mode = MODE.DEFAULT; switch (pos) { case Positioning._2D: mode = MODE._2D; break; case Positioning._3D: mode = MODE._3D; break; case Positioning._3D_LINEAR_ROLLOFF: mode = MODE._3D_LINEARROLLOFF; break; case Positioning._3D_LINEAR_SQUARE_ROLLOFF: mode = MODE._3D_LINEARSQUAREROLLOFF; break; case Positioning._3D_INVERSE_ROLLOFF: mode = MODE._3D_INVERSEROLLOFF; break; } return(mode); }
void Start() { oldSprite = GameObject.Find("PlaySimButton").GetComponent <Image> ().sprite; ball = GameObject.Find("Ball"); isSimActive = false; positioning = GameObject.Find("UIManager").GetComponent <Positioning> (); }
private void game_PlayerActed(Guid playerId, ActionType action, int amountToCall, int amount) { var actionBucket = ActionAbstracter.MapToBucket(action, amountToCall, currentGame.PotSize, amount); actionHistory.Add(actionBucket); FeatureAction featureAction = FeatureActionAbstracter.FromActionBucket(actionBucket); var currentPhasehistory = actionHistoriesPerPhase.FirstOrDefault(x => x.Phase == currentGame.Phase); currentPhasehistory.ActionHistory.Add(featureAction); if (this.Id != playerId) { Positioning opponentPositioning = Positioning.None; Aggression opponentAggression = Aggression.None; if (currentGame.Phase > GamePhase.PreFlop) { opponentPositioning = getOpponentPositioning(currentPhasehistory.ActionHistory.Count); opponentAggression = getOpponentAggression(opponentPositioning); } opponent.UpdateFeaturesAfterAction(currentPhasehistory.ActionHistory, currentGame.Phase, opponentAggression, opponentPositioning); } }
// Use this for initialization void Start() { _positioning = GetComponent <Positioning>(); _hit = GetComponent <Hit>(); _navAgent = GetComponent <NavMeshAgent>(); _animator = GetComponent <Animator>(); }
private void Update() { if (!buildMode) { return; } if (placingBuilding) { Ray ray = playerCam.ScreenPointToRay(Input.mousePosition); RaycastHit hit; Physics.Raycast(ray, out hit, 1000, 1 << LayerMask.NameToLayer("Terrain")); if (hit.collider != null) { building.transform.position = Positioning.GetSnappedPosition(hit.point); if (buildingScript.GridSizeX == 2 && buildingScript.GridSizeY == 2) { building.transform.position -= new Vector3(0.5f, 0f, 0.5f); } } if (Input.GetMouseButtonDown(0) && placementGrid.IsPlacementValid()) { DeployBuilding(); } } else { CheckInputs(); } }
protected virtual void OnDraw(EventArgs args) { if (DrawingsMenu.Item("streamingmode").GetValue <bool>()) { DrawingsMenu.Item("enemycccounter").Permashow(false); DrawingsMenu.Item("enemycounter").Permashow(false); return; } DrawingsMenu.Item("enemycccounter").Permashow(); DrawingsMenu.Item("enemycounter").Permashow(); if (Environment.TickCount - _lastUpdate > 367) { DrawingsMenu.Item("enemycccounter").SetValue(Positioning.EnemyCC()); DrawingsMenu.Item("enemycounter").SetValue(Player.CountEnemiesInRange(2000)); _lastUpdate = Environment.TickCount; } if (DrawingsMenu.Item("drawenemyrangecircle").GetValue <bool>()) { foreach (var polygon in Positioning.DangerZone()) { polygon.Draw(Color.Red, 2); } } }
public void AddToSprint(Task task) { BacklogTasks.Remove(task); task.SprintRelevant = true; if (task.SprintPosition == null) { // Add it at the bottom of the ToDo tasks task.SprintPosition = Positioning.Calculate(SprintTasks.Where(t => t.Status == Status.ToDo).LastOrDefault()?.Position, null); DataAccess.UpdateTask(task); } else { DataAccess.UpdateTaskSprintRelevance(task); } for (int i = 0; i < SprintTasks.Count(); i++) { if (String.Compare(SprintTasks[i].SprintPosition, task.SprintPosition) >= 0) { SprintTasks.Insert(i, task); ApplyFilters(); return; } } SprintTasks.Add(task); ApplyFilters(); Selected = task; }
static TreeSharp.Action TakeAction() { return(new TreeSharp.Action(a => { Logging.Log("SWITCHED MODE TO FIGHT"); var target = Variables.TargetSelector.GetTarget(1100); if (target != null && !target.IsUnderEnemyTurret()) { if ( ObjectManager.Get <Obj_AI_Hero>() .Any(h => h.IsAlly && !h.IsMe && !h.IsDead && h.Distance(ObjectManager.Player) < 1100)) { Positioning.GetTeamfightPosition().WalkToPoint(OrbwalkingMode.Hybrid); } else { target.Position.Extend(ObjectManager.Player.Position, ObjectManager.Player.GetRealAutoAttackRange() - 250) .WalkToPoint(OrbwalkingMode.Hybrid); } } else { Push.BehaviorComposite.Tick(null); } })); }
private static void Main(string[] args) { var path = "clientSettings.json"; var settings = new JavaScriptSerializer().Deserialize <ClientSettings>(System.IO.File.ReadAllText(path)); //az összes adobe process bezárása Positioning.CloseAllAdobeProcess(); //a shortcut managing elintézése ShortcutOperations.SetStartUp(); //ha kell akkor az ablak elrejtése InitMainProgram.Hide(); //a szükséges paraméterek betöltése InitMainProgram.SetUpParams(settings); ClientStarter.StartClients(Datas.CountOfMonitors); foreach (var item in ClientStarter.Clients) { item.Client.OnDisconnect += Client_OnDisconnect; } Console.ReadLine(); }
private Aggression getOpponentAggression(Positioning positioning) { GamePhase previousPhase = currentGame.Phase - 1; var previousHistory = actionHistoriesPerPhase.FirstOrDefault(x => x.Phase == previousPhase); var secondLastAction = previousHistory.ActionHistory[previousHistory.ActionHistory.Count - 2]; // only betting is considered to be aggressive if (secondLastAction == FeatureAction.Bet) { if (previousHistory.ActionHistory.Count % 2 == 0) { if (positioning == Positioning.InPosition) { return(Aggression.IsNotLast); } else { return(Aggression.IsLast); } } else { if (positioning == Positioning.InPosition) { return(Aggression.IsLast); } else { return(Aggression.IsNotLast); } } } return(Aggression.None); }
public BaseTileObject Place(Tile source, Positioning direction) { SourceTile = source; Position = direction; SpawnVisuals(); return(this); }
/// <summary> /// Margin doesn't work yet. Leave it at 0. /// </summary> /// <param name="p"></param> /// <param name="o"></param> /// <param name="al"></param> /// <param name="pos"></param> /// <param name="img"></param> /// <param name="txt"></param> /// <param name="font"></param> /// <param name="col"></param> /// <param name="margin"></param> public UIBGImg(Positioning p, Origin o, Alignment al, Point pos, Texture2D img, string txt, SpriteFont font, Color col, float _margin = 0) : base(p, o, al, pos, txt, font, col) { margin = _margin; margin = 0; i = new UIImage(p, o, al, new Point(pos.x - margin, pos.y - margin), size, img); i.calcsize = false; }
public void SetupUIHLine(Vector2 pos) { _pos = pos; _positioning = Positioning.Horizontal; UIController.Instance.SetupHLine(_uiLine, pos); GameController.Instance.LogicLines.Add(this); }
public void SetupUIVLine(Vector2 pos, int rowLength) { _pos = pos; _positioning = Positioning.Vertical; UIController.Instance.SetupVLine(_uiLine, pos, rowLength); GameController.Instance.LogicLines.Add(this); }
public UIText(Positioning p, Origin o, Alignment al, Point pos, string txt, SpriteFont font, Color col) : base(p, o, al, pos, new Size(font.MeasureString(txt))) { calcsize = false; t = txt; f = font; c = col; }
/// <inheritdoc /> public int DrawText(string text, Color color, int bar, double y, Positioning orient) { var textObj = new ChartText(text, bar, y, color); textObjs.Add(objectId, textObj); objectId++; return(objectId); }
static TreeSharp.Action TakeAction() { return(new Action(a => { Logging.Log("SWITCHED MODE TO PUSH"); Positioning.GetFarmingPosition().WalkToPoint(OrbwalkingMode.LaneClear); })); }
private void MoveToPosition(Vector2 position, MovementController[] units) { Vector2[] destinations = Positioning.GetUnitGroupDestinations(position, units.Length, .5f); for (int i = 0; i < units.Length; i++) { units[i].MoveToGround(destinations[i]); } }
static TreeSharp.Action TakeAction() { return(new TreeSharp.Action(a => { Logging.Log("SWITCHED MODE TO FREEZE"); Positioning.GetFarmingPosition().WalkToPoint(OrbwalkingMode.Hybrid); })); }
static TreeSharp.Action TakeAction() { Logging.Log("SWITCHED MODE TO TEAMFIGHT"); return(new Action(a => { Positioning.GetTeamfightPosition().WalkToPoint(OrbwalkingMode.Combo); })); }
public UIControl(Positioning _p, Origin _o, Alignment _al, Point _pos, Size _size) { calcsize = true; pos = _pos; size = _size; p = _p; o = _o; al = _al; }
public Component(Component parent) { _location = new PointF(); _size = new SizeF(); _position = Positioning.Relative; _alignment = ContentAlignment.TopLeft; _name = ""; _parent = parent; }
void Start() { rb = GetComponent <Rigidbody>(); Vector3 cog = new Vector3(0, -1, 0); rb.centerOfMass = cog; ranker = tracer.GetComponent <Positioning>(); }
private void UpdatePositions() { var positions = PoolPositionUtility.GetAllIndices(); foreach (var i in positions) { var position = UiPool.GetPosition(i); position.transform.position = Positioning.GetPositionFor(i); } }
protected override void OnClosing(CancelEventArgs e) { if (SaveProject() == DialogResult.Cancel) { e.Cancel = true; return; } Options.GetInstance().Save(Application.ExecutablePath); // save position and size Positioning.Save(this, RegistryHive.CurrentUser, REGISTRY_KEY); }
private void HandleReorder(Task task, int indexFrom, int indexTo) { string nextPos = BacklogTasksFiltered.ElementAtOrDefault(indexTo + 1)?.Position ?? Positioning.EndStop; string prevPos = BacklogTasks.Where(t => String.Compare(nextPos, t.Position) >= 1).OrderBy(t => t.Position).LastOrDefault()?.Position ?? "a"; // if there are sprint tasks that would be below the previous (= above) element make sure that the new element is placed below those as well so that they end in a similar position once they are added to the backlog again prevPos = SprintTasks.Where(t => String.Compare(t.Position, prevPos) >= 0 && String.Compare(t.Position, nextPos) < 0).OrderBy(t => t.Position).LastOrDefault()?.Position ?? prevPos; task.Position = Positioning.Calculate(prevPos, nextPos); DataAccess.UpdateTaskPosition(task); }
public void PlaySim() { Positioning.hideButtons(); Positioning.isPositioning = false; BlockHover.hideGrid(); BlockHover.hideRampGrid(); foreach (GameObject child in GameObject.FindGameObjectsWithTag("Spawned Objects")) { foreach (MonoBehaviour script in child.GetComponents <MonoBehaviour>()) { if (!script.name.Equals("ElementPlacing")) { if (!isSimActive) { script.enabled = true; } else { script.enabled = false; } } } } if (!isSimActive) { GameObject.Find("PlaySimButton").GetComponent <Image> ().sprite = GameObject.Find("StopSprite").GetComponent <SpriteRenderer> ().sprite; //ball.transform.position = new Vector3 (2, 0.21f, -3.07f); BallRespawn.respawnBall(); ball.GetComponent <Rigidbody> ().isKinematic = false; ball.GetComponent <Rigidbody> ().detectCollisions = true; } else { GameObject.Find("PlaySimButton").GetComponent <Image> ().sprite = oldSprite; BallRespawn.respawnBall(); //ball.transform.position = new Vector3 (2, 0.21f, -3.07f); ball.GetComponent <Rigidbody> ().isKinematic = true; ball.GetComponent <Rigidbody> ().detectCollisions = false; ball.GetComponent <Rigidbody> ().velocity = Vector2.zero; ball.GetComponent <Rigidbody> ().angularVelocity = Vector2.zero; } isSimActive = !isSimActive; if (isSimActive) { wt.OnMouseDown(); } }