using UnityEngine;
using System.Collections;
public class InputBtnLeft : MonoBehaviour {
private GameObject btnRight;
void Awake () {
btnRight = GameObject.Find("btnRight");
}
void OnPress (bool pressed) {
if (pressed) {
InputHandler.movingLeft = true;
TouchButtonController.touchBtnLeftPressed = true;
} else {
InputHandler.movingLeft = false;
TouchButtonController.touchBtnLeftPressed = false;
}
}
void OnDragOver(GameObject draggedObject) {
btnRight.SendMessage("OnPress", false);
gameObject.SendMessage("OnPress", true);
}
void OnDragEnd() {
btnRight.SendMessage("OnPress", false);
}
}