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 void OnDrop(PointerEventData Block) | |
{ | |
Debug("Block.pointerDrag=" + (Block.pointerDrag == null ? "NULL" : "NOT-NULL") + | |
", Block.pointerDrag.tag='" + Block.pointerDrag.tag + | |
"', gameObject.tag='" + gameObject.tag + "'"); | |
if (Block.pointerDrag != null && Block.pointerDrag.tag == gameObject.tag) | |
{ | |
Block.pointerDrag.GetComponent<RectTransform>().anchoredPosition = GetComponent<RectTransform>().anchoredPosition; | |
DragDrop.isInSpace = true; |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerController : MonoBehaviour | |
{ | |
private Rigidbody playerRb; | |
public float jumpForce; |
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
void Update() | |
{ | |
If (Input.GetKeyDown(KeyCode.C)) | |
{ | |
cameras[cameraIndex].SetActive(false); | |
cameraIndex = (cameraIndex + 1) % cameras.Length; | |
cameras[cameraIndex].SetActive(true); | |
} | |
} |
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
void Update() | |
{ | |
If (Input.GetKeyDown(KeyCode.C)) | |
{ | |
cameras[cameraIndex].SetActive(false); | |
cameraIndex = (cameraIndex + 1) % cameras.Length; | |
cameras[cameraIndex].SetActive(true); | |
} | |
} |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GameManager : MonoBehaviour | |
{ | |
public ParticleSystem dirtParticle; | |
void Update() | |
{ |
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 class Spawner : MonoBehaviour | |
{ | |
[SerializeField] private float minDelay = 1.0f; | |
[SerializeField] private float maxDelay = 5.0f; | |
[SerializeField] private GameObject houndPrefab; | |
private bool isGameRunning; | |
// Flags the game as running and queues the first hound | |
void Start() |