chunk 1: core gameplay scripts scenes runtime assets
This commit is contained in:
27
Assets/Scripts/Ground Check/FallCheck.cs
Normal file
27
Assets/Scripts/Ground Check/FallCheck.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class FallCheck : MonoBehaviour
|
||||
{
|
||||
public float groundDistance = 0.2f;
|
||||
public LayerMask groundLayer;
|
||||
public Transform groundCheckTransform;
|
||||
|
||||
public bool isFallen;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
//groundCheckTransform = GameObject.Find("fallcheck").transform;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
//isFallen = Physics.CheckSphere(groundCheckTransform.position, groundDistance, groundLayer, QueryTriggerInteraction.Ignore);
|
||||
}
|
||||
|
||||
public bool IsFallen()
|
||||
{
|
||||
return isFallen;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user