Created
April 28, 2018 23:19
-
-
Save HectorPulido/96b5cee256a4ee587fad85b126f36eed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool IsGround | |
{ | |
get | |
{ | |
if(JumpingAttack) | |
return false; | |
var cc = Physics2D.BoxCast(groundCheckPosition.position, groundCheckSize,0, Vector2.up); | |
if (cc == null) | |
return false; | |
if (cc.collider == null) | |
return false; | |
if (cc.collider.gameObject == gameObject) | |
return false; | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment