Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour {
//Creates a public static variable for the GameManager class
//A static class will mean that any changes made to the GameManager will affect all copies of the variable
public static GameManager instance;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour {
// Creates a public static variable for the GameManager class
// A static class will mean that any changes made to the GameManager will affect all copies of the variable
public static GameManager instance;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour {
// Creates a public static variable for the GameManager class
// A static class will mean that any changes made to the GameManager will affect all copies of the variable
public static GameManager instance;
@IronMonk-UK
IronMonk-UK / GameManager.cs
Created February 27, 2016 16:10
Final Project Iteration 27/02
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour
{
// Creates a public static variable for the GameManager class
// A static class will mean that any changes made to the GameManager will affect all copies of the variable
@IronMonk-UK
IronMonk-UK / barScale.cs
Created March 7, 2016 11:43
The scripts relating to the modular spaceship project created.
using UnityEngine;
using System.Collections;
public class barScale : MonoBehaviour {
public stats shipStats;
public int maxStat;
public string type;
@IronMonk-UK
IronMonk-UK / Exit.cs
Created March 7, 2016 13:13
The C# code for the Text Adventure
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TextAdventure
{
class Exit
{
@IronMonk-UK
IronMonk-UK / GameManager.cs
Created March 13, 2016 13:39
13/03 Iteration of Final Project
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour
{
public static GameManager gm;
@IronMonk-UK
IronMonk-UK / GameManager.cs
Created March 21, 2016 16:00
Post-Implementation of the Inventory System
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour
{
public static GameManager gm;
foreach userUnit u
userUnit target
pathTarget = u.node
if indexOf u.node + 1 <= movement + 1
bool inRange = true
if inRange
List<UserUnit> UnitsInRange
@IronMonk-UK
IronMonk-UK / AIUnit Snippet
Last active April 7, 2016 13:07
AI Snippets
public override void turnUpdate()
{
//A boolean added in preparation, should it be required
findUnits = true;
//I created a List within the GameManager to store specifically User Units, allowing the AI to loop through them
foreach (UserUnit u in gm.userUnits)
{
//The path target is set to the unit, creating a path from the AI Unit to the User Unit
path.target.transform.position = u.currentTile._pos;
//A debug log to ensure results were being picked up correctly