// Handle viewport sync private void Player_Moved(object sender, ItemMovedEventArgs <GoRogue.GameFramework.IGameObject> e) { if (CurrentMap == TestGame.CurrentMap) { TestGame.MapConsole.CenterViewPortOnPoint(Position); } }
private void BaseMapOnObjectMoved(object?sender, ItemMovedEventArgs <IGameObject> e) { if (!e.Item.IsWalkable || _goalMaps.ContainsKey(e.Item)) { _dirty = true; } }
private void OnPlayerMoved(object sender, ItemMovedEventArgs <IGameObject> e) { var player = e.Item as Player; Map.CalculateFOV(e.NewPosition, player.FOVRadius, Radius.DIAMOND); Draw(); }
private void ListControl_OnItemMovedHandler(object sender, ItemMovedEventArgs args) { if (OnItemMoved != null) { OnItemMoved(args.OldItemIndex, args.NewItemIndex, list); } }
private void Player_Moved(object sender, ItemMovedEventArgs <IGameObject> e) { Map.CalculateFOV(Map.ControlledGameObject.Position, Map.ControlledGameObject.FOVRadius, Radius.SQUARE); MapRenderer.CenterViewPortOnPoint(Map.ControlledGameObject.Position); // TODO: Start using GameFrameManager instead TickWorld(); }
/// <summary> /// Raises the ItemRemoved event. /// </summary> /// <param name="e">Event arguments</param> private void OnItemRemoved(ItemMovedEventArgs e) { try { _itemRemoved(this, e); } catch {} }
// Handle the case where GoRogue's Position property was the one that initiated the move private void GoRogue_Moved(object sender, ItemMovedEventArgs <IGameObject> e) { if (Position != base.Position) // We need to sync entity { base.Position = Position; } // SadConsole's Entity position set can't fail so no need to check for success here }
private void TypeContextBase_ItemMoved(object sender, ItemMovedEventArgs <_I> e) { foreach (var item in this.GetTables()) { var tableInfo = item.TableInfo; this.MoveType(ref tableInfo, e.OldPath, e.Item.Path); item.TableInfo = tableInfo; } }
private void OnObjectMoved(object sender, ItemMovedEventArgs <IGameObject> e) { // if (!(e.Item is Character character)) return; // // var fromPos = MapToWorld(new Vector2(e.OldPosition.X, e.OldPosition.Y)); // var toPos = MapToWorld(new Vector2(e.NewPosition.X, e.NewPosition.Y)); // character.TweenToPosition(fromPos, toPos); // character.PlayMovementSound(); }
public void OnItemMoved(ItemMovedEventArgs eventArgs) { if (eventArgs.prevSlot >= 0) { inv.RemoveItem(eventArgs.prevSlot); } if (eventArgs.newSlot >= 0) { inv.SetItem((int)eventArgs.newSlot, eventArgs.item); } }
private static void OnPlayerMove(object sender, ItemMovedEventArgs <IGameObject> e) { Game.Animations.Add( sender.GetHashCode(), new FlashAnimation( new Coord[1] { e.OldPosition }, Color.White, TimeSpan.FromMilliseconds(600), delay: TimeSpan.FromMilliseconds(100))); }
private void ItemMovedNotification(object sender, ItemMovedEventArgs args) { Assert.ArgumentNotNull(sender, "sender"); Assert.ArgumentNotNull(args, "args"); this.AddUpdatedItem(args.Item, true); Item item = args.Item.Database.GetItem(args.OldParentID); if (item != null) { this.AddUpdatedItem(item, false); } }
// Only entities (not terrain) can move so this is ok to just assume entities. private void Map_ObjectMoved(object sender, ItemMovedEventArgs <IGameObject> e) { if (!Enabled) { return; } if (Map.FOV.BooleanFOV[e.NewPosition]) { UpdateEntitySeen((BasicEntity)(e.Item)); } else { UpdateEntityUnseen((BasicEntity)(e.Item)); } }
static void PstSplit_OnItemMoved(object sender, ItemMovedEventArgs e) { if (currentFolder == null) { currentFolder = e.DestinationFolder.RetrieveFullPath(); } string folderPath = e.DestinationFolder.RetrieveFullPath(); if (currentFolder != folderPath) { Console.WriteLine(" Added {0} messages to \"{1}\"", messageCount, currentFolder); messageCount = 0; currentFolder = folderPath; } messageCount++; }
void Player_Moved(object sender, ItemMovedEventArgs <IGameObject> e) { Map.CalculateFOV(Player.Position, Game.Settings.FovDistance, Game.Settings.FovRadius); List <string> output = new List <string>(); string coords = "At " + Player.Position.X + ", " + Player.Position.Y + ";"; output.Add(coords); string answer = ""; foreach (Area area in Map.GetRegions(Player.Position)) { answer += area + ", "; } output.Add(answer); Thoughts.Component.Think(output.ToArray()); Health.Print(); Display.CenterViewPortOnPoint(Map.ControlledGameObject.Position); }
private void MapOnObjectMoved(object?sender, ItemMovedEventArgs <IGameObject> e) { Direction direction = Direction.GetDirection(e.OldPosition, e.NewPosition); foreach (IGameObject gameObject in Map.GetObjects(e.OldPosition)) { if (gameObject.GetComponent <TriggerComponent>() is TriggerComponent triggerComponent) { triggerComponent.Exit(e.Item, direction); } } foreach (IGameObject gameObject in Map.GetObjects(e.NewPosition)) { if (gameObject.GetComponent <TriggerComponent>() is TriggerComponent triggerComponent) { triggerComponent.Enter(e.Item, direction); } } }
static void PstMerge_OnItemMoved(object sender, ItemMovedEventArgs e) { // ExStart:MergePSTFiles-PstMerge_OnItemMoved if (currentFolder == null) { currentFolder = e.DestinationFolder.RetrieveFullPath(); } string folderPath = e.DestinationFolder.RetrieveFullPath(); if (currentFolder != folderPath) { Console.WriteLine(" Added {0} messages to \"{1}\"", messageCount, currentFolder); messageCount = 0; currentFolder = folderPath; } messageCount++; totalAdded++; // ExEnd:MergePSTFiles-PstMerge_OnItemMoved }
private bool timeLineView_ItemMoved(object sender, ItemMovedEventArgs e) { TSequence fromSequence = animation.sequenceAtIndex(e.FromRowIndex); TSequence toSequence = animation.sequenceAtIndex(e.ToRowIndex); TAction action = animation.actionAtIndex(e.FromRowIndex, e.FromItemIndex); if (fromSequence != null && toSequence != null && action != null) { toSequence.insertAction(e.ToItemIndex, action); if (e.FromRowIndex == e.ToRowIndex && e.ToItemIndex < e.FromItemIndex) { fromSequence.deleteAction(e.FromItemIndex + 1); } else { fromSequence.deleteAction(e.FromItemIndex); } return(true); } return(false); }
private void KanBan_ItemMoved(object sender, ItemMovedEventArgs e) { var item = (ContractSalesItem)e.Source; UpdateRestServerContractSalesItem(item); }
private void OnItemMoved(object?s, ItemMovedEventArgs <MyIDImpl> e) { Assert.Equal(_oldPos, e.OldPosition); Assert.Equal(_newPos, e.NewPosition); }
private void onItemMoved(object s, ItemMovedEventArgs <MyIDImpl> e) { Assert.AreEqual(oldPos, e.OldPosition); Assert.AreEqual(newPos, e.NewPosition); }
private void ItemMovedNotification(object sender, ItemMovedEventArgs args) { Assert.ArgumentNotNull(sender, "sender"); Assert.ArgumentNotNull(args, "args"); if ((WebUtil.GetQueryString("mo") == "preview") && (args.Item.ID.ToString() == WebUtil.GetQueryString("fo"))) { UrlOptions defaultOptions = UrlOptions.DefaultOptions; defaultOptions.ShortenUrls = false; SheerResponse.SetAttribute("scPostAction", "value", "goto:" + LinkManager.GetItemUrl(args.Item, defaultOptions)); } Item folder = this.ContentEditorDataContext.GetFolder(); if (Settings.ContentEditor.ClassicFrameEventPropagation || ((folder != null) && (((folder.ID == args.Item.ID) || (folder.ID == args.OldParentID)) || (folder.ID == args.Item.ParentID)))) { string str = string.Concat(new object[] { "notification:itemmoved(item=", GetUri(args.Item), ",oldparentid=", args.OldParentID, ")" }); Context.ClientPage.ClientResponse.Eval("scContent.postMessage(\"" + str + "\")"); } }
private void Mobile_Moved(object sender, ItemMovedEventArgs <IGameObject> e) { DrawEntity.Position = e.NewPosition; }
/* UNUSED FOR NOW, BUT DO NOT DELETE. * void UpdateRelativePositions(object sender, SceneSwitchEventArgs e) { * // Extremely hacky (ONCE SCENES ARE ALIGNED, THIS WON'T BE NECESSARY) * Transform spaceConversionObj = GameObject.Find ("PastPresentDistance").transform; * Transform child1 = spaceConversionObj.GetChild (0); * if (child1.name.ToLower ().Contains ("past")) * pastToPresent = -child1.position + spaceConversionObj.GetChild (1).position; * else * pastToPresent = -spaceConversionObj.GetChild (1).position + child1.position; * } */ /// <summary>Event handler for the itemMoved event provided by ItemController.</summary> /// <param name="source">Originator of itemMoved event.</param> /// <param name="eventArgs">Useful context of the itemMoved event.</param> public void OnItemMoved(object source, ItemMovedEventArgs eventArgs) { activeCharacter.OnItemMoved(eventArgs); }
private void OnEnemyActed(object sender, ItemMovedEventArgs <IGameObject> e) { }
void destinationFolder_ItemMoved(object sender, ItemMovedEventArgs e) { totalAdded++; }
/// <summary> /// Raises the ItemAdded event. /// </summary> /// <param name="e">Event arguments</param> private void OnItemAdded(ItemMovedEventArgs e) { try { _itemAdded(this, e); } catch {} }
protected virtual void OnMoved(object sender, ItemMovedEventArgs <IGameObject> e) { gameObject.transform.DOMove(new Vector3(e.NewPosition.X, e.NewPosition.Y, 0), 0.15f); }
private void OnPlayerMove(object sender, ItemMovedEventArgs <IGameObject> e) { // Engine.E.Map.CalculateFOV(Position, Awareness); CurrentMap.CalculateFOV(Position, Stats[StatTypes.AWARENESS]); }
private void Player_Moved(object sender, ItemMovedEventArgs <IGameObject> e) { Map.CalculateFOV(Map.ControlledGameObject.Position, Map.ControlledGameObject.FOVRadius, Radius.SQUARE); MapRenderer.CenterViewPortOnPoint(Map.ControlledGameObject.Position); }
private void GameObjectManager_ItemMoved(object sender, ItemMovedEventArgs <GameObjects.GameObjectBase> e) { e.Item.Position = e.NewPosition.ToPoint(); e.Item.MoveTo(e.NewPosition.ToPoint()); e.Item.IsVisible = map.Surface.ViewPort.Contains(e.Item.Position); }