c# - For Android this is a simple script which i want to modify for touch devices? -
Text after "
This is a simple script for double jump, but I also touch it
to respond to Want Personal LlatformerCharacter2D Characters; Private Bowl Jump; Zero awake () {character = GetComponent & lt; LlatformerCharacter2D & gt; (); } Zero Update () {if (Input.GetButtonDown ("Jump")) jump = true; } Without fixed updates () {character.Move (1, false, jump); Jumping = false; }
Create an object with the collider and tag it as tag (it Your jump button) and see if it has touched
zero update () {if (Input.GetMouseButtonDown (0)} {Ray Re: Camera.main.ScreenPointToRay (Input.mousePosition) ; Reit Hit Hit; If (Physics. Recast (ray, out hit)) {if (hit.collider.tag == "Jump") jump = true; }}}
Comments
Post a Comment