Commits

PolCPP committed 17097e5

Fixed compilation issues on android and warnings (non used vars).
Fixed a code regression on the input manager.

Comments (0)

Files changed (8)

Assembly-CSharp.pidb

Binary file modified.

Assets/Scripts/InputManager.cs

 	private Button rightButton;
 	private RaycastHit hit;
 	private Ray ray;
-	
+	private int directionFingerID = -1;  	
+
 	void Awake ()
 	{
 		switch (InputModeState) {
 	{
 		// First we'll analyse the Movement axis, we'll get, -1 for left and 1 for right.
 		buttonStatus = (int)Input.GetAxis ("Horizontal");
+
 		foreach (Touch touch in Input.touches) {
 			if (touch.phase == TouchPhase.Began || touch.phase == TouchPhase.Moved) {
 				ray = Camera.main.ScreenPointToRay (touch.position);
 				if (Physics.Raycast (ray, out hit)) {
-					if (hit.transform.gameObject.name == LeftButtonGoName) 
-						touchStatus = -1;
-					else if (hit.transform.gameObject.name == RightButtonGoName)
-						touchStatus = 1;
-				} 
-			} else if (touch.phase == TouchPhase.Ended) {
-				touchStatus = 0;					
+					if (hit.transform.gameObject.name == LeftButtonGoName)  {
+						directionFingerID = touch.fingerId;						
+						touchStatus = -1;						
+					}
+					else if (hit.transform.gameObject.name == RightButtonGoName) {
+						directionFingerID = touch.fingerId;
+						touchStatus = 1;				
+					}
+				}
+			} else if (touch.phase == TouchPhase.Ended && touch.fingerId == directionFingerID) {
+				directionFingerID = -1;
+				touchStatus = 0;
 			}
 		}
 		if (buttonStatus == 1 || touchStatus == 1) {

Assets/TileMapper/Code/TileMap.cs

 			switch (outerNode.Name) {
 			case "tileset":	
 				XmlNode imageNode = outerNode.SelectSingleNode ("image");
-				int firstGID = int.Parse (outerNode.Attributes ["firstgid"].InnerText);
 				int width = int.Parse (outerNode.Attributes ["tilewidth"].InnerText);
 				int height = int.Parse (outerNode.Attributes ["tileheight"].InnerText);
 				int imageWidth = int.Parse (imageNode.Attributes ["width"].InnerText);

Assets/TileMapper/Code/TileSet.cs

 using System;
-using UnityEditor;
 using UnityEngine;
 
 public class TileSet

Library/EditorUserBuildSettings.asset

Binary file modified.

twisted-potions-double-trouble-csharp.sln

 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
-																																					GlobalSection(MonoDevelopProperties) = preSolution
+																																						GlobalSection(MonoDevelopProperties) = preSolution
 		StartupItem = Assembly-CSharp.csproj
 		Policies = $0
 		$0.TextStylePolicy = $1

twisted-potions-double-trouble.sln

 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
-																																				GlobalSection(MonoDevelopProperties) = preSolution
+																																					GlobalSection(MonoDevelopProperties) = preSolution
 		StartupItem = Assembly-CSharp.csproj
 		Policies = $0
 		$0.TextStylePolicy = $1

twisted-potions-double-trouble.userprefs

 <Properties>
   <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="Assets/scripts/CameraManager.cs">
+  <MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/InputManager.cs">
     <Files>
       <File FileName="Assets/scripts/PlayerCharacter.cs" Line="52" Column="9" />
-      <File FileName="Assets/scripts/InputManager.cs" Line="55" Column="77" />
+      <File FileName="Assets/scripts/InputManager.cs" Line="73" Column="3" />
       <File FileName="Assets/scripts/GUIManager.cs" Line="14" Column="17" />
       <File FileName="Assets/scripts/Button.cs" Line="16" Column="19" />
       <File FileName="Assets/scripts/CameraManager.cs" Line="58" Column="2" />
+      <File FileName="Assets/TileMapper/Code/TileMap.cs" Line="1" Column="1" />
+      <File FileName="Assets/TileMapper/Code/TileSet.cs" Line="1" Column="1" />
+      <File FileName="Assets/TileMapper/Code/Layer.cs" Line="1" Column="1" />
+      <File FileName="Assets/Scripts/InputManager.cs" Line="1" Column="1" />
     </Files>
   </MonoDevelop.Ide.Workbench>
   <MonoDevelop.Ide.DebuggingService.Breakpoints>