merge commit

This commit is contained in:
2022-04-11 18:46:10 +03:00
parent 6f7c3eaa9b
commit 82b7e7fbb2
21 changed files with 2314 additions and 1437 deletions

View File

@@ -15,13 +15,13 @@ public class CuttableTree : MonoBehaviour
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
void OnTriggerEnter(Collider other)
@@ -31,9 +31,22 @@ public class CuttableTree : MonoBehaviour
rotation = transform.rotation;
rotation *= Quaternion.AngleAxis(20, Vector3.up);
Instantiate(stumpPrefab, transform.position, rotation);
Instantiate(logPrefab, transform.position+new Vector3(0, 1, 0), rotation);
Instantiate(logPrefab, transform.position + new Vector3(0, 1, 0), rotation);
onCut.Invoke();
Destroy(gameObject);
}
}
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == "Cutter")
{
rotation = transform.rotation;
rotation *= Quaternion.AngleAxis(20, Vector3.up);
Instantiate(stumpPrefab, transform.position, rotation);
Instantiate(logPrefab, transform.position + new Vector3(0, 1, 0), rotation);
onCut.Invoke();
Destroy(gameObject);
}
}
}

View File

@@ -49,7 +49,7 @@ public class PortalTeleporter : MonoBehaviour
Debug.Log(_enabled);
if (_portalCanBeUsed && !_justUsed && _enabled)
{
if (other.name.StartsWith("Holster") || other.tag.Contains(""))
if (other.name.StartsWith("Holster") || other.tag.Contains("Holster"))
{
Debug.Log("holster");
}