hey guys thank you for readining this i am getting an error CS0103 saying the name tmpC does not exist in current context my code is as below
using UnityEngine;
using System.Collections;
public class inputController : MonoBehaviour {
private bool isMobile = true;
private Playerhandler _player;
// Use this for initialization
void Start () {
if (Application.isEditor)
isMobile = false;
_player = GameObject.Find ("Player").GetComponent<Playerhandler> ();
}
// Update is called once per frame
void Update () {
if (isMobile) {
int tmpC = Input.touchCount;
tpmC --;
if (Input.GetTouch (tmpC).phase == TouchPhase.Began) {
handleInteraction (true);
}
if (Input.GetTouch (tmpC).phase == TouchPhase.Ended) {
handleInteraction (false);
}
} else {
if (Input.GetMouseButtonDown (0)) {
handleInteraction (true);
}
if (Input.GetMouseButtonUp (0)) {
handleInteraction (false);
}
}
}
void handleInteraction(bool starting){
if (starting) {
_player.jump ();
} else {
}
}
}
the link of the tutorial i followed is this one
thanks in advance