This file contains hidden or 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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.IO; | |
public static class SaveLoad { | |
public static List<Game> savedGames = new List<Game>(); | |
This file contains hidden or 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 UnityEngine; | |
using System.Collections; | |
[System.Serializable] | |
public class Character { | |
public string name; | |
public Character () { | |
this.name = ""; |
This file contains hidden or 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 UnityEngine; | |
using System.Collections; | |
[System.Serializable] | |
public class Game { | |
public static Game current; | |
public Character warrior; | |
public Game () { |
This file contains hidden or 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 UnityEngine; | |
using System.Collections; | |
using UnityEngine.SceneManagement; | |
public class LevelLoadManager : MonoBehaviour { | |
public GameObject player; | |
public GameObject trigger; | |
public Texture2D fadeOutTexture; // the texture that will overlay the screen. This can be a black image or a loading graphic | |
public float fadeSpeed = 0.2f; // the fading speed |
This file contains hidden or 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 UnityEngine; | |
using System.Collections; | |
using UnityEngine.SceneManagement; | |
public class ClickToLoad : MonoBehaviour { | |
public void loadLevel(string nextLevel) { | |
StartCoroutine(DisplayLoading(nextLevel)); |
This file contains hidden or 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 UnityEngine; | |
using System.Collections; | |
using UnityEngine.SceneManagement; | |
public class LevelLoadManager : MonoBehaviour { | |
public GameObject player; | |
public GameObject trigger; | |
public Texture2D fadeOutTexture; // the texture that will overlay the screen. This can be a black image or a loading graphic | |
public float fadeSpeed = 0.2f; // the fading speed |
This file contains hidden or 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 UnityEngine; | |
using System.Collections; | |
public class AsyncSample : MonoBehaviour { | |
IEnumerator Start() { | |
AsyncOperation async = Application.LoadLevelAsync("name of the scene here"); | |
yield return async; | |
Debug.Log("Loading complete"); | |
} | |
} |
This file contains hidden or 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 UnityEngine; | |
public class Spawn_Manager : MonoBehaviour { | |
public Transform[] spawnPoints; | |
public float invokeTime; | |
public GameObject spawnObjects; | |
public int maxInvoke; | |
private int invokeCount; |
This file contains hidden or 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 UnityEngine; | |
public class AI_StateMachine : MonoBehaviour { | |
public Transform[] target; | |
public GameObject player; | |
private int destPoint = 0; | |
NavMeshAgent agent; | |
private float distance = 0.0f; |
This file contains hidden or 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
RaycastHit hit | |
void Start () { | |
} | |
void Update () { | |
bool found = Physics.Raycast(transform.position, transform.forward, hit, 7); | |
if(!found) return; |
NewerOlder