parent
047073fe8a
commit
e16413b2da
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class Goal : MonoBehaviour
|
||||
{
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.tag == "IceBlock")
|
||||
{
|
||||
Debug.Log("Win");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d66d4e72f6fa56b4788ea9a4017bfb8f
|
||||
@ -1,17 +1,30 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class Pit : MonoBehaviour
|
||||
{
|
||||
public PlayerMove player;
|
||||
public IceBlockPush ice;
|
||||
public PlayerMove player;
|
||||
public IceBlockPush ice;
|
||||
//
|
||||
// // Update is called once per frame
|
||||
// void Update()
|
||||
// {
|
||||
// if (Input.GetKeyDown(KeyCode.Space))
|
||||
// {
|
||||
// player.Reset();
|
||||
// ice.Reset();
|
||||
// }
|
||||
// }
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
player.Reset();
|
||||
ice.Reset();
|
||||
}
|
||||
}
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.GetComponent<PlayerMove>())
|
||||
{
|
||||
player.Reset();
|
||||
}
|
||||
else if(other.GetComponent<IceBlockPush>())
|
||||
{
|
||||
ice.Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue