This commit is contained in:
2025-05-13 05:12:44 +03:00
parent 235216efe2
commit fb64cf1186
22 changed files with 476 additions and 4 deletions
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 875a88bf44bdb7046af9df7d79e362b4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
+1 -1
View File
@@ -27,7 +27,7 @@ public class CrossHair : MonoBehaviour {
// Update is called once per frame
void Update () {
var ray = camera.ViewportPointToRay (new Vector3(0.5f,0.5f,0.0f));
var ray = GetComponent<Camera>().ViewportPointToRay (new Vector3(0.5f,0.5f,0.0f));
hasHit = Physics.Raycast (ray, out hit);
if (hasHit) {
target = hit.point;
+1 -1
View File
@@ -42,7 +42,7 @@ public class CrossbowArrow : MonoBehaviour {
hitName = "HitGlass";
}
GameObject hitObjSrc = physicsHits.transform.FindChild(hitName).gameObject;
GameObject hitObjSrc = physicsHits.transform.Find(hitName).gameObject;
GameObject hitObj = (GameObject)Instantiate(hitObjSrc);
hitObj.transform.localPosition = hit.point;
hitObj.transform.rotation = Quaternion.FromToRotation(Vector3.up, hit.normal);
+1 -1
View File
@@ -23,7 +23,7 @@ public class PlayerController : MonoBehaviour {
// Use this for initialization
void Start () {
cameraObject = gameObject.transform.FindChild ("Camera").gameObject;
cameraObject = gameObject.transform.Find ("Camera").gameObject;
rotateUpDown = transform.localEulerAngles.x;
rotateLeftRight = transform.localEulerAngles.y;
c = gameObject.GetComponent<CharacterController> ();
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Collections;
public class Utils {
public static GameObject FindChildRecursive(GameObject obj, string name){
var child = obj.transform.FindChild (name);
var child = obj.transform.Find (name);
if (child != null) {
return child.gameObject;
}