public PCPopupMenuAction(GameObject actor, HotSpot target)
        : base(actor)
    {
        InitInteractionInfo(false, false, false);

        this.target = target;
        finished = false;
    }
Esempio n. 2
0
 public static void AddHotSpot(HotSpot hotSpot)
 {
     if (hotSpot.IsValid && !hotSpotList.Any(h => h.Equals(hotSpot)))
     {
         Logger.Log(TrinityLogLevel.Debug, LogCategory.CacheManagement, "Added HotSpot {0}", hotSpot);
         hotSpotList.Add(hotSpot);
     }
 }
Esempio n. 3
0
		protected override async Task<bool> Main()
		{
			if (startZoneId != WorldManager.ZoneId)
			{
				return isDone = true;
			}

			if (ExProfileBehavior.Me.Distance(Location) <= Distance)
			{
				return isDone = true;
			}

			if (HotSpots != null)
			{
				if (Type == MoveToType.Auto)
				{
					Type = MoveToType.RandomPointWithin;
				}

				var locations = new List<HotSpot>(HotSpots);
				if (Location != Vector3.Zero)
				{
					locations.Add(new HotSpot(Location, Distance) {Name = Name});
				}

				destination = locations.Shuffle().First();

				Logger.Verbose(Localization.Localization.ExMoveTo_Random, Location);
			}
			else
			{
				if (Type == MoveToType.Auto)
				{
					Type = MoveToType.StopWithinRange;
				}

				destination = new HotSpot(Location, Distance) {Name = Name};
			}

			var name = !string.IsNullOrWhiteSpace(destination.Name) ? "[" + destination.Name + "] " : string.Empty;

			StatusText = string.Format(Localization.Localization.ExMoveTo_Move, name, destination, Type);

			switch (Type)
			{
				case MoveToType.StopWithinRange:
					await destination.MoveTo(UseMesh);
					break;
				case MoveToType.RandomPointWithin:
					await destination.MoveToPointWithin();
					break;
			}

			return isDone = true;
		}
Esempio n. 4
0
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0)
            {
                Offset = spot.Memory.Process.ParseAddress(spot.Text);

                AddressFormula = spot.Text;
            }
        }
 public PCControllableAction(GameObject actor, bool sitting, string seatType)
     : base(actor)
 {
     //if (!sitting){
         InitAnimationInfo("idle_pose_1", WrapMode.Loop, Emotion.BodyParts.ALL);
     //}
     pcMover = (PCMover)actor.GetComponent("PCMover");
     this.sitting = sitting;
     this.seatType = seatType;
     clickedHotSpot = null;
 }
Esempio n. 6
0
 public static void WriteHotSpot(string UserID, int FullText, Knowledge knowledge)
 {
     HotSpot model = new HotSpot
     {
         UserID     = UserID,
         TypeID     = knowledge.TypeId,
         LngId      = knowledge.LngId,
         CategoryID = knowledge.CategoryName,
         FullText   = FullText
     };
     //todo
 }
Esempio n. 7
0
        /// <summary>
        /// Resets the selection state of all selected nodes.
        /// </summary>
        public void ClearSelection()
        {
            selectionAnchor = selectionCaret = null;

            selectedNodes.ForEach(h => h.Node.ClearSelection());

            selectedNodes.Clear();

            OnSelectionChanged();

            //Invalidate();
        }
Esempio n. 8
0
        /// <summary>Updates the node from the given spot and sets the value.</summary>
        /// <param name="spot">The spot.</param>
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0)
            {
                if (bool.TryParse(spot.Text, out var val))
                {
                    spot.Process.WriteRemoteMemory(spot.Address, (byte)(val ? 1 : 0));
                }
            }
        }
Esempio n. 9
0
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0)
            {
                if (int.TryParse(spot.Text, out var val))
                {
                    spot.Memory.Process.WriteRemoteMemory(spot.Address, val);
                }
            }
        }
Esempio n. 10
0
 public HotSpot(HotSpot h)
 {
     ID       = h.ID;
     Name     = h.Name;
     Content  = h.Content;
     Pos      = h.Pos;
     BaseTime = h.BaseTime;
     Time     = h.Time;
     ItemID   = h.ItemID;
     Icon     = h.Icon;
     Marker   = h.Marker;
 }
Esempio n. 11
0
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0 || spot.Id == 1)
            {
                if (long.TryParse(spot.Text, out var val) || spot.Text.TryGetHexString(out var hexValue) && long.TryParse(hexValue, NumberStyles.HexNumber, null, out val))
                {
                    spot.Memory.Process.WriteRemoteMemory(spot.Address, val);
                }
            }
        }
Esempio n. 12
0
    private void PopulatePhysicalPanels()
    {
        for (int i = 0; i < hotSpots.Length; i++)
        {
            HotSpot hotSpot = hotSpots[i];
            string  file    = textFiles[i].text;

            // Split the file into 2 parts, title and text
            string[] split = file.Split(new string[] { "." }, 2, System.StringSplitOptions.None);
            hotSpot.physicalTitle.text = split[0];
            hotSpot.physicalText.text  = split[1];
        }
    }
Esempio n. 13
0
        /// <summary>Updates the node from the given <paramref name="spot"/>. Sets the <see cref="Name"/> and <see cref="Comment"/> of the node.</summary>
        /// <param name="spot">The spot.</param>
        public virtual void Update(HotSpot spot)
        {
            Contract.Requires(spot != null);

            if (spot.Id == HotSpot.NameId)
            {
                Name = spot.Text;
            }
            else if (spot.Id == HotSpot.CommentId)
            {
                Comment = spot.Text;
            }
        }
Esempio n. 14
0
    private void HotSpotControl(Ray pointer)
    {
        // Cast a ray from the centre eye position.
        RaycastHit hit;

        // If the ray hits a hotspot
        if (Physics.Raycast(pointer, out hit, 20.0f) && hit.transform.tag == "HotSpot")
        {
            // Make the current hotspot active
            if (currentHotspot == null)
            {
                currentHotspot = hit.transform.GetComponentInParent <HotSpot>();
            }
            // If already active
            else
            {
                // Hover the active HotSpot
                currentHotspot.StartHover();
                shouldOpen = true;
            }
        }
        // Else if the current hotspot is faced away from, deactivate it
        else if (currentHotspot != null && !hotSpotOpen)
        {
            currentHotspot.EndHover();
            currentHotspot = null;
        }
        // Close the open hotspot when the tigger is pressed
        else if (OVRInput.Get(OVRInput.Axis1D.SecondaryIndexTrigger) < 0.1f && hotSpotOpen)
        {
            currentHotspot.CloseHotSpot();
            currentHotspot = null;
            hotSpotOpen    = false;
            dimmer.SetActive(false);
        }
        else
        {
            shouldOpen = false;
        }

        if (OVRInput.Get(OVRInput.Axis1D.SecondaryIndexTrigger) < 0.1f && shouldOpen)
        {
            // Open the hotspot
            currentHotspot.OpenHotSpot();
            hotSpotOpen = true;

            // Move the camera to the hotspot
            MoveCamera("HotSpot");
            shouldOpen = false;
        }
    }
Esempio n. 15
0
        public void Update(HotSpot spot, int max)
        {
            Contract.Requires(spot != null);

            base.Update(spot);

            if (spot.Id >= 0 && spot.Id < max)
            {
                if (float.TryParse(spot.Text, out var val))
                {
                    spot.Memory.Process.WriteRemoteMemory(spot.Address + spot.Id * ValueTypeSize, val);
                }
            }
        }
Esempio n. 16
0
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0)
            {
                if (int.TryParse(spot.Text, out var val) && val > 0)
                {
                    Length = val;

                    ParentNode.ChildHasChanged(this);
                }
            }
        }
Esempio n. 17
0
        /// <summary>Updates the node from the given spot. Sets the value of the selected byte.</summary>
        /// <param name="spot">The spot.</param>
        /// <param name="maxId">The highest spot id.</param>
        public void Update(HotSpot spot, int maxId)
        {
            Contract.Requires(spot != null);

            base.Update(spot);

            if (spot.Id >= 0 && spot.Id < maxId)
            {
                if (byte.TryParse(spot.Text, NumberStyles.HexNumber, null, out var val))
                {
                    spot.Memory.Process.WriteRemoteMemory(spot.Address + spot.Id, val);
                }
            }
        }
Esempio n. 18
0
 public void ToggleInfoPanel()
 {
     // If using the open button, (from static view) assign the hotspot
     if (currentHotspot == null)
     {
         currentHotspot = hotSpots.transform.Find(Camera.main.name.ToString()).GetComponent <HotSpot>();
         hotSpotOpen    = true;
         currentHotspot.HotSpotControl();
     }
     // If the hotspot is already open
     else
     {
         InfoPanelClose();
     }
 }
Esempio n. 19
0
 protected override void OnStart()
 {
     if (Hotspots != null && Hotspots.Count > 0)
     {
         var choice = Core.Random.Next(0, Hotspots.Count);
         RoughDestination = Hotspots[choice];
     }
     else
     {
         RoughDestination = new HotSpot(XYZ, 0)
         {
             AllowedVariance = AllowedVariance, ArrivalTolerance = ArrivalTolerance
         };
     }
 }
Esempio n. 20
0
    private void HotSpotControl(Ray pointer)
    {
        // Cast a ray from the centre eye position.
        RaycastHit hit;

        // If the ray hits a hotspot
        if (Physics.Raycast(pointer, out hit, 20.0f) && hit.transform.tag == "HotSpot")
        {
            // Make the current hotspot active
            if (currentHotspot == null)
            {
                currentHotspot = hit.transform.GetComponentInParent <HotSpot>();
            }
            // If already active
            else
            {
                // Hover the active HotSpot
                currentHotspot.StartHover();

                // If trigger is pressed, open it
                if (Controller.GetPressUp(SteamVR_Controller.ButtonMask.Touchpad) && !hotSpotOpen)
                {
                    currentHotspot.OpenHotSpot();
                    hotSpotOpen = true;
                    MoveCamera("HotSpot");
                }
                else if (Controller.GetPressUp(SteamVR_Controller.ButtonMask.Touchpad) && hotSpotOpen)
                {
                    currentHotspot.CloseHotSpot();
                    currentHotspot = null;
                    hotSpotOpen    = false;
                }
            }
        }
        // Else if the current hotspot is faced away from, deactivate it
        else if (currentHotspot != null && !hotSpotOpen)
        {
            currentHotspot.EndHover();
            currentHotspot = null;
        }
        // Close the open hotspot when the tigger is pressed
        else if (Controller.GetPressUp(SteamVR_Controller.ButtonMask.Touchpad) && hotSpotOpen)
        {
            currentHotspot.CloseHotSpot();
            currentHotspot = null;
            hotSpotOpen    = false;
        }
    }
        public void Relate(RefugeeModel refugee, HotSpot hotSpot)
        {
            Ensure.That(nameof(refugee)).IsNotNull();

            Ensure.That(nameof(hotSpot)).IsNotNull();

            string refugeeLabel = typeof(RefugeeModel).Name;

            string hotSpotLabel = typeof(HotSpot).Name;

            GraphClient.Cypher.Match($"(r:{refugeeLabel})", $"(h:{hotSpotLabel})")
            .Where((RefugeeModel r) => r.Id == refugee.Id)
            .AndWhere((HotSpot h) => h.Id == hotSpot.Id)
            .CreateUnique($"(r)-[:{LivesInRelationship.TypeKey}]->(h)")
            .ExecuteWithoutResults();
        }
Esempio n. 22
0
        /// <summary>
        /// Updates the cursor based on the hotspot that is currently selected or hovered over.
        /// </summary>
        /// <param name="hspot"></param>
        private void UpdateCursor(HotSpot hspot)
        {
            switch (hspot)
            {
            case HotSpot.TopLeft1:
            case HotSpot.TopLeft2:
                this.Cursor = Cursors.SizeNWSE;
                break;

            case HotSpot.Top:
                this.Cursor = Cursors.SizeNS;
                break;

            case HotSpot.TopRight1:
            case HotSpot.TopRight2:
                this.Cursor = Cursors.SizeNESW;
                break;

            case HotSpot.Right:
                this.Cursor = Cursors.SizeWE;
                break;

            case HotSpot.BottomRight1:
            case HotSpot.BottomRight2:
                this.Cursor = Cursors.SizeNWSE;
                break;

            case HotSpot.Bottom:
                this.Cursor = Cursors.SizeNS;
                break;

            case HotSpot.BottomLeft1:
            case HotSpot.BottomLeft2:
                this.Cursor = Cursors.SizeNESW;
                break;

            case HotSpot.Left:
                this.Cursor = Cursors.SizeWE;
                break;

            default:
                this.Cursor = Cursors.Arrow;
                break;
            }
        }
Esempio n. 23
0
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0)
            {
                if (spot.Text.TryGetHexString(out var hexValue) && long.TryParse(hexValue, NumberStyles.HexNumber, null, out var val))
                {
#if RECLASSNET64
                    var address = (IntPtr)val;
#else
                    var address = (IntPtr) unchecked ((int)val);
#endif

                    spot.Memory.Process.WriteRemoteMemory(spot.Address, address);
                }
            }
        }
Esempio n. 24
0
    // Responsible for checking if the user has clicked a hotspot, and if so, triggering the hotspot
    void HasClickedHotspot()
    {
        if (overGuiButton == false)
        {
            RaycastHit hit;

            Ray ray = panoCamera.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(ray, out hit, 100))
            {
                if (hit.collider.gameObject.GetComponent <HotSpot>() != null)
                {
                    HotSpot hotSpot = hit.collider.gameObject.GetComponent <HotSpot>();
                    hotSpot.Execute(" triggered by mouse");
                }
            }
        }
    }
Esempio n. 25
0
    void OnDestroy()
    {
        if (serialPort != null)
        {
            Debug.Log("Close on Destroy!");

            for (int i = 0; i < hotSpots.Length; i++)
            {
                HotSpot hotSpot = hotSpots[i];

                string command = hotSpot.Commands[1];
                serialPort.WriteLine(command);
            }

            serialPort.Close();
            serialPort = null;
        }
    }
Esempio n. 26
0
        public override async Task <bool> MoveToSpot(ExGatherTag tag)
        {
            tag.StatusText = "Moving to " + this;

            if (HotSpots == null || HotSpots.Count == 0)
            {
                return(false);
            }

            if (approachLocation == null)
            {
                approachLocation = HotSpots.Shuffle().First();
            }

            var result = await approachLocation.MoveTo(dismountAtDestination : Stealth);

            if (!result)
            {
                return(false);
            }

            var landed = MovementManager.IsDiving || await NewNewLandingTask();

            if (landed && Core.Player.IsMounted && !MovementManager.IsDiving)
            {
                ActionManager.Dismount();
            }

            Navigator.Stop();
            await Coroutine.Yield();

            if (Stealth)
            {
#if RB_CN
                await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);
#else
                await tag.CastAura(Ability.Sneak, AbilityAura.Sneak);
#endif
            }

            result = await NodeLocation.MoveToOnGroundNoMount(tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);

            return(result);
        }
Esempio n. 27
0
 private static string GetHotSpotMarkupName(HotSpot spot)
 {
     if (spot is PolygonHotSpot)
     {
         return("poly");
     }
     else if (spot is RectangleHotSpot)
     {
         return("rect");
     }
     else if (spot is CircleHotSpot)
     {
         return("circle");
     }
     else
     {
         throw new NotSupportedException("Other hot spot types not supported");
     }
 }
Esempio n. 28
0
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0)
            {
                if (int.TryParse(spot.Text, out var val) && val > 0)
                {
                    Length = val;

                    GetParentContainer()?.ChildHasChanged(this);
                }
            }
            else if (spot.Id == 1)
            {
                var data = Encoding.GetBytes(spot.Text);
                spot.Memory.Process.WriteRemoteMemory(spot.Address, data);
            }
        }
Esempio n. 29
0
        public virtual void DeleteHotSpot(Guid id)
        {
            if (id == default(Guid))
            {
                throw new RestException(HttpStatusCode.BadRequest, Constants.Messages.InvalidIdentifier, new ArgumentException(Constants.Messages.InvalidIdentifier, nameof(id)));
            }

            using (IUnitOfWork unitOfWork = UnitOfWorkFactory.Create())
            {
                HotSpot hotSpot = unitOfWork.HotSpotRepository.GetById(id);

                if (hotSpot == null)
                {
                    throw new RestException(HttpStatusCode.NotFound, Constants.Messages.ResourceCannotBeFound, new ArgumentException(Constants.Messages.ResourceCannotBeFound));
                }

                unitOfWork.HotSpotRepository.Delete(hotSpot);
            }
        }
Esempio n. 30
0
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0 || spot.Id == 1)
            {
                int value;
                if (int.TryParse(spot.Text, out value))
                {
                    if (spot.Id == 0)
                    {
                        if (value != 0)
                        {
                            Count = value;

                            ParentNode.ChildHasChanged(this);
                        }
                    }
                    else
                    {
                        if (value < Count)
                        {
                            CurrentIndex = value;
                        }
                    }
                }
            }
            else if (spot.Id == 2)
            {
                if (CurrentIndex > 0)
                {
                    --CurrentIndex;
                }
            }
            else if (spot.Id == 3)
            {
                if (CurrentIndex < Count - 1)
                {
                    ++CurrentIndex;
                }
            }
        }
Esempio n. 31
0
        public void ItemsRequest(object sender, ItemsRequestEventArgs e)
        {
            List <object> items      = new List <object>();
            double        minZoom    = e.MinZoom;
            Location      upperLeft  = e.UpperLeft;
            Location      lowerRight = e.LowerRight;
            HotSpot       centerSpot = new HotSpot();

            centerSpot.X = 0.5;
            centerSpot.Y = 0.5;
            Location     bulgariaLocation = new Location(42.7669999748468, 25.2819999307394);
            LocationRect currentRegion    = new LocationRect(upperLeft, lowerRight);

            if (currentRegion.Contains(bulgariaLocation))
            {
                if (minZoom == 3)
                {
                    Ellipse ellipse = new Ellipse();
                    ellipse.Width  = 15;
                    ellipse.Height = 15;
                    ellipse.Fill   = new SolidColorBrush(Colors.Red);
                    ellipse.SetValue(MapLayer.LocationProperty, bulgariaLocation);
                    MapLayer.SetHotSpot(ellipse, centerSpot);
                    ToolTipService.SetToolTip(ellipse, "Bulgaria");
                    items.Add(ellipse);
                }
                else if (minZoom == 6)
                {
                    Ellipse sofiaEllipse = new Ellipse();
                    sofiaEllipse.Width           = 20;
                    sofiaEllipse.Height          = 20;
                    sofiaEllipse.Stroke          = new SolidColorBrush(Colors.Red);
                    sofiaEllipse.Fill            = new SolidColorBrush(Colors.Transparent);
                    sofiaEllipse.StrokeThickness = 3;
                    sofiaEllipse.SetValue(MapLayer.LocationProperty, new Location(42.6957539183824, 23.3327663758679));
                    MapLayer.SetHotSpot(sofiaEllipse, centerSpot);
                    ToolTipService.SetToolTip(sofiaEllipse, "Sofia");
                    items.Add(sofiaEllipse);
                }
            }
            e.CompleteItemsRequest(items);
        }
Esempio n. 32
0
    public void UpdateActiveHotSpot()
    {
        ActionProperties actionProperties = ReturnCurrentActionProperties();
        HotSpot          newHotSpot       = (actionProperties == null) ? null : ReturnMatchingHotSpot(ReturnCurrentActionProperties().HotSpotLocation);

        if (_currentlyActiveHotSpot == newHotSpot)
        {
            return;
        }

        if (_currentlyActiveHotSpot != null)
        {
            HideHotSpotIndication(_currentlyActiveHotSpot);
        }

        // Set new hot spot.
        _currentlyActiveHotSpot = newHotSpot;
        IndicateHotSpot(_currentlyActiveHotSpot);
        AnimationHelper.UpdateDefaultAnimation(actionProperties.AnimationTypeToIndicate);
    }
Esempio n. 33
0
        public override void Update(HotSpot spot)
        {
            base.Update(spot);

            if (spot.Id == 0 || spot.Id == 1)
            {
                if (int.TryParse(spot.Text, out var value))
                {
                    if (spot.Id == 0 && !IsReadOnly)
                    {
                        if (value != 0)
                        {
                            Count = value;

                            GetParentContainer()?.ChildHasChanged(this);
                        }
                    }
                    else
                    {
                        if (value < Count)
                        {
                            CurrentIndex = value;
                        }
                    }
                }
            }
            else if (spot.Id == 2)
            {
                if (CurrentIndex > 0)
                {
                    --CurrentIndex;
                }
            }
            else if (spot.Id == 3)
            {
                if (CurrentIndex < Count - 1)
                {
                    ++CurrentIndex;
                }
            }
        }
Esempio n. 34
0
		public override async Task<bool> MoveToSpot(ExGatherTag tag)
		{
			tag.StatusText = "Moving to " + this;

			if (approachLocation == Vector3.Zero)
			{
				if (HotSpots == null || HotSpots.Count == 0)
				{
					return false;
				}

				approachLocation = HotSpots.Shuffle().First();
			}

			var result =
				await
				approachLocation.MoveToPointWithin(dismountAtDestination: Stealth);

			if (result)
			{
				await Coroutine.Yield();

				if (Stealth)
				{
					await tag.CastAura(Ability.Stealth, AbilityAura.Stealth);
					result =
						await NodeLocation.MoveToNoMount(UseMesh, tag.Distance, tag.Node.EnglishName, tag.MovementStopCallback);
				}
				else
				{
					result =
						await
						NodeLocation.MoveTo(UseMesh,
							radius: tag.Distance,
							name: tag.Node.EnglishName,
							stopCallback: tag.MovementStopCallback);
				}
			}

			return result;
		}
Esempio n. 35
0
        public void ItemsRequest(object sender, ItemsRequestEventArgs e)
        {
            List<object> items = new List<object>();
            double minZoom = e.MinZoom;
            Location upperLeft = e.UpperLeft;
            Location lowerRight = e.LowerRight;
            HotSpot centerSpot = new HotSpot();
            centerSpot.X = 0.5;
            centerSpot.Y = 0.5;
            Location bulgariaLocation = new Location(42.7669999748468, 25.2819999307394);
            LocationRect currentRegion = new LocationRect(upperLeft, lowerRight);

            if (currentRegion.Contains(bulgariaLocation))
            {
                if (minZoom == 3)
                {
                    Ellipse ellipse = new Ellipse();
                    ellipse.Width = 15;
                    ellipse.Height = 15;
                    ellipse.Fill = new SolidColorBrush(Colors.Red);
                    ellipse.SetValue(MapLayer.LocationProperty, bulgariaLocation);
                    MapLayer.SetHotSpot(ellipse, centerSpot);
                    ToolTipService.SetToolTip(ellipse, "Bulgaria");
                    items.Add(ellipse);
                }
                else if (minZoom == 6)
                {
                    Ellipse sofiaEllipse = new Ellipse();
                    sofiaEllipse.Width = 20;
                    sofiaEllipse.Height = 20;
                    sofiaEllipse.Stroke = new SolidColorBrush(Colors.Red);
                    sofiaEllipse.Fill = new SolidColorBrush(Colors.Transparent);
                    sofiaEllipse.StrokeThickness = 3;
                    sofiaEllipse.SetValue(MapLayer.LocationProperty, new Location(42.6957539183824, 23.3327663758679));
                    MapLayer.SetHotSpot(sofiaEllipse, centerSpot);
                    ToolTipService.SetToolTip(sofiaEllipse, "Sofia");
                    items.Add(sofiaEllipse);
                }
            }
            e.CompleteItemsRequest(items);
        }
Esempio n. 36
0
    /// <summary>
    /// Activate any visuals for the hot spots here.
    /// </summary>
    public void IndicateHotSpot(HotSpot hotSpot)
    {
        if (hotSpot == null)
        {
            return;
        }

        GameObject indicator = ReturnCurrentActionProperties().Indicator;

        if (indicator == null)
        {
            return;
        }

        _hotSpotIndicator = Instantiate(indicator);

        Debug.Log(string.Format("Hot spot {0} is active now.", hotSpot.HotSpotHelper.HotSpotLocation), this);

        _hotSpotIndicator.transform.position = hotSpot.HotSpotHelper.transform.position;
        _hotSpotIndicator.SetActive(true);
    }
Esempio n. 37
0
    // Executed when the button "Create hotspot" is clicked. Creates the hotspot, with the option to undo.
    void OnWizardCreate()
    {
        // Applies all the settings specified in the window to the actual script on the hotspot object
        hotSpot = hotSpotObject.AddComponent<HotSpot>() ;
        hotSpot.hotSpotID = hotSpotID ;
        hotSpot.runExternalFunction = runExternalFunction ;
        hotSpot.sendHotSpotIdExternal = sendHotSpotIdExternal ;
        hotSpot.externalFunctionName = externalFunctionName ;
        hotSpot.sendHotSpotIdInternal = sendHotSpotIdInternal ;
        hotSpot.objectToSendIdTo = objectToSendIdTo ;
        hotSpot.nameOfRecievingMethod = nameOfRecievingMethod ;
        hotSpot.requiresReciever = requiresReciever ;
        hotSpot.debugHotSpotIdInConsole = debugIdToConsole ;
        hotSpot.loadsNewScene = loadsNewScene ;
        hotSpot.sceneName = sceneName ;
        hotSpot.loadsNewPano = loadsNewPano ;
        hotSpot.panoMaterialToLoad = panoMaterialToLoad ;
        hotSpot.playsSound = playsSound ;
        hotSpot.soundToPlay = soundToPlay ;

        Undo.RegisterCreatedObjectUndo(hotSpot, "Create hotspot") ;
    }
Esempio n. 38
0
		HotSpot AddHotSpot (double x, double y, double w, double h)
		{
			HotSpot hp = new HotSpot ();
			hp.Rect = new Rectangle ((int)x, (int)y, (int)w, (int)h);
			hostSpots.Add (hp);
			return hp;
		}
 protected override void UpdateAnyRound()
 {
     if (sitting){
         if (!animator.IsPlaying("sit_" + seatType)){
             StartAnimation("sit_" + seatType, WrapMode.Loop, Emotion.BodyParts.FACE);
         }
     } else if (state.GetSleepDept() > 0){
         //actionRunner.ResetRoutine(new PCSleepAction(actor), true);
         actionRunner.ResetRoutine(new PCForcedSleepAction(actor), true);
     } else {
         pcMover.MovePC();
     }
     FreeWalkGUI.UpdateCursor();
     GameObject clickedGameObject = FreeWalkGUI.GetClickedHotSpot();
     if (clickedGameObject != null){
         //Debug.Log("HotSpot clicked");
         clickedHotSpot = (HotSpot)clickedGameObject.GetComponent("HotSpot");
     }
 }
	// Methods
	public int Add(HotSpot spot) {}
	public void Insert(int index, HotSpot spot) {}
Esempio n. 42
0
		private void PopUpForm_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			HotSpot spot = HotSpot.None;

			if ( m_TitleBounds.Contains( e.X, e.Y ) )
			{
				spot = HotSpot.Title;
			}
			else if ( m_CloseBounds.Contains( e.X, e.Y ) )
			{
				spot = HotSpot.Close;
			}

			if ( m_HotSpot != spot )
			{
				m_HotSpot = spot;
				Refresh();
			}

			if ( m_HotSpot == HotSpot.Title && m_Callback != null )
			{
				Cursor = Cursors.Hand;
			}
			else
			{
				Cursor = Cursors.Arrow;
			}
		}
Esempio n. 43
0
        private void ShowFlag(MapCoord coord, Uri imageUri, bool target)
        {
            if (_informationLayer == null)
            {
                throw new NullReferenceException("Map not already created!");
            }

            var hotSpot = new HotSpot();

            if (target)
            {
                hotSpot.X = 0.15;
                hotSpot.Y = 0.85;
            }
            else
            {
                hotSpot.X = 0.22;
                hotSpot.Y = 0.9;
            }

            var reprojCoord = coord.ToGeographic();
            var mapPinPoint = new MapPinPoint {ImageSource = new BitmapImage(imageUri)};
            MapLayer.SetHotSpot(mapPinPoint, hotSpot);
            MapLayer.SetLocation(mapPinPoint, new Location(reprojCoord.Latitude, reprojCoord.Longitude));
            _informationLayer.Items.Add(mapPinPoint);
        }
	public void Remove(HotSpot spot) {}