<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — ChangeLocation]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1380</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1380&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in ChangeLocation.]]></description>
		<lastBuildDate>Wed, 16 Oct 2019 11:30:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: ChangeLocation]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5700#p5700</link>
			<description><![CDATA[<p>Thanks a lot I&#039;ll try it </p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Wed, 16 Oct 2019 11:30:14 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5700#p5700</guid>
		</item>
		<item>
			<title><![CDATA[Re: ChangeLocation]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5699#p5699</link>
			<description><![CDATA[<p>No, you need to invoke the map redraw (OnlineMaps.instance.Redraw).</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 16 Oct 2019 09:45:19 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5699#p5699</guid>
		</item>
		<item>
			<title><![CDATA[Re: ChangeLocation]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5698#p5698</link>
			<description><![CDATA[<p>Ok ..<br />The code is little more complex ... Forgote the code .. let me ask you with another more simple way .<br />I have created a Marker and it shown on my screen .<br />My Quistion : for changing the position of the marker .I need just to type : marker.positiin=new vector2(32.0000,35.000);<br />my Quistion is this line enough to change the marker position ?</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Wed, 16 Oct 2019 09:42:35 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5698#p5698</guid>
		</item>
		<item>
			<title><![CDATA[Re: ChangeLocation]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5697#p5697</link>
			<description><![CDATA[<p>First_Connection.MC.PI.Player_Is_Master<br />This line checks that the current player is a master, right?<br />In this case, why does SendMyLoacationToMaster check that the current player is not a master?<br />Most likely it should be checked that the current player is a master.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 16 Oct 2019 09:23:23 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5697#p5697</guid>
		</item>
		<item>
			<title><![CDATA[Re: ChangeLocation]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5695#p5695</link>
			<description><![CDATA[<p>Hi<br />i need to know if that enough to ReDraw the new marker position ? it doesnt redraw the marker with the new position .. if this device is in a moiving car it should show the marker moving on the master screen after sending this RPC Function ?!!</p><p>private void OnLocationChanged(Vector2 position)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; MPV = Add_Room.go_to_Player_room.GetComponent&lt;PhotonView&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; // Change the position of the marker.<br />&nbsp; &nbsp; &nbsp; &nbsp; playerMarker.position = position;<br />&nbsp; &nbsp; &nbsp; &nbsp; First_Connection.GClass.The_Marker[0].marker.position = position;<br />&nbsp; &nbsp; &nbsp; &nbsp; First_Connection.GClass.The_Marker[0].Latitude = position.y;<br />&nbsp; &nbsp; &nbsp; &nbsp; First_Connection.GClass.The_Marker[0].Longtude = position.x;<br />&nbsp; &nbsp; &nbsp; &nbsp; First_Connection.GClass.The_Marker[0].position = position;<br />&nbsp; &nbsp; &nbsp; &nbsp; //First_Connection.GClass.The_Marker[0].marker.position = position;<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.Redraw();<br />&nbsp; &nbsp; &nbsp; &nbsp; if (First_Connection.MC.PI.Player_Is_Master == false)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MPV.RPC(&quot;SendMyLoacationToMaster&quot;, RpcTarget.MasterClient, position, Load_Rooms.Player_Name);</p><p>and the RPC function is :<br /> [PunRPC]<br />&nbsp; &nbsp; private void SendMyLoacationToMaster(Vector2 Position,string name)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; int found = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; if (First_Connection.MC.PI.Player_Is_Master == false)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; First_Connection.GClass.The_Driver.Count; i++)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (First_Connection.GClass.The_Driver[i ].Driver_Name == name)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; First_Connection.GClass.The_Driver[i ].position = Position;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; First_Connection.GClass.The_Driver[i ].marker.position = Position;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Send My Locateion To Master : &quot; + First_Connection.GClass.The_Driver[i ].Driver_Name);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; found = 1;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (found == 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Driver driver = new Driver();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Texture2D txtr;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txtr = Resources.Load(&quot;c620c6b7a2b0e22a05e179ed8e7ab6b0_icon&quot;) as Texture2D;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // txtr = Resources.Load(&quot;Taxi&quot;) as Texture2D;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //OnlineMapsLocationService locationService = OnlineMapsLocationService.instance;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Create a new marker.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.marker = OnlineMapsMarkerManager.CreateItem(Position, txtr, name);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //playerMarker.align = OnlineMapsAlign.Center;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.latitude = Position.y;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.longtude = Position.x;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.position = Position;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.Driver_Found_And_Updated = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.Driver_Not_Found_Counter = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //driver.marker = playerMarker;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.Time_Enter_Room = System.DateTime.Now;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.Time_He_Push_Free = System.DateTime.Now;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Marker Created Successfully......&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; driver.Driver_Name = name;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; First_Connection.GClass.The_Driver.Add(driver);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.Redraw();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Tue, 15 Oct 2019 15:02:21 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5695#p5695</guid>
		</item>
		<item>
			<title><![CDATA[Re: ChangeLocation]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5694#p5694</link>
			<description><![CDATA[<p>Hello.</p><p>Based on your description, it&#039;s hard to say what&#039;s wrong.<br />Please show the full script.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 14 Oct 2019 12:45:25 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5694#p5694</guid>
		</item>
		<item>
			<title><![CDATA[ChangeLocation]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5692#p5692</link>
			<description><![CDATA[<p>Hi<br />I am using Pun2 there is a master that can see every player position on his screen .<br />when some one moved his device location i need to notice the master about his new location .<br />so i add an event OnLocationChanged for every player and in that event function i added a RPC function that send the new location to the master . <br />but new locations doesn&#039;t shown.or Updated . <br />do i need to use (OnlineMaps.instance.Redraw();) &quot;i used it <br />what i supposed to do ?</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Sun, 13 Oct 2019 18:51:03 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5692#p5692</guid>
		</item>
	</channel>
</rss>
