public virtual void SavePosition() { if (this.Position != null) { this.SavedPosition = this.Position.Clone(false); } }
public override void Place(IMemoryElementPosition position, bool completeEvent = true) { foreach (ICrowdMember crowdMember in this.CrowdMemberCollection) { if (crowdMember is Crowd) { crowdMember.Place(null); } else { crowdMember.Place(this.SavedPositions[crowdMember.Name]); } } }
public bool IsWithin(float maxDistance, IMemoryElementPosition From, out float calculatedDistance) { bool isWithinDistance = false; Vector3 currentCameraPosition = new Vector3(X, Y, Z); Vector3 targetElementPosition = new Vector3(From.X, From.Y, From.Z); calculatedDistance = Vector3.Distance(currentCameraPosition, targetElementPosition); if ((calculatedDistance >= 0 && calculatedDistance <= maxDistance) || (calculatedDistance < 0 && calculatedDistance >= -maxDistance)) { isWithinDistance = true; } if (calculatedDistance > 100) { } return(isWithinDistance); }
public virtual void Place(IMemoryElementPosition position = null, bool completeEvent = true) { this.Target(); if (new MemoryElement().Position == null || new MemoryElement().Position.Pointer != this.Position.Pointer || this.HasBeenSpawned) { this.Spawn(); } if (this.RosterCrowd != null) { RosterCrowd.Place(this, completeEvent); } else if (position != null) { Position = position.Clone(false, (Position as MemoryInstance).GetTargetPointer()); } this.SuperImposeGhost(); }
public virtual void Place(IMemoryElementPosition position, bool completeEvent = true) { }