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; | |
//The difficulty levels | |
enum Difficulty | |
{ | |
EasyPeasy, | |
LemonSqueezy, |
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; | |
using Random = UnityEngine.Random; | |
public class Lists : MonoBehaviour | |
{ | |
[SerializeField] private List<String> robotModels; | |
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 PlayerStats | |
{ | |
public int userLevel; | |
public string userName; | |
public int manaLevel; |
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 ChangeColorPlayer : MonoBehaviour | |
{ | |
void Update() | |
{ | |
if (Input.GetKeyDown(KeyCode.Alpha1)) | |
{ |
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; | |
//The class is static and doesnt derive form monobehavior | |
public static class ColorHelper | |
{ | |
//this changes to a specific color that is passed in to the object passed in | |
public static void ColorChanger(GameObject obj, Color colorChoice) | |
{ |
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 ItemDatabase : MonoBehaviour | |
{ | |
public Item goldBar = new Item(); | |
public Weapon bastardSword = new Weapon(); |
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; | |
//Serializable lets you see it in the inspector | |
[Serializable] | |
public class Item | |
{ | |
//Item variables that all items share |
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 ItemDatabase : MonoBehaviour | |
{ | |
public ItemUpdated goldBar = new ItemItemUpdated(); | |
public WeaponUpdated bastardSword = new WeaponUpdated(); |
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; | |
//Serializable lets you see it in the inspector | |
[Serializable] | |
public class WeaponUpdated : ItemUpdated | |
{ | |
//These variables exist in addition to the base Item class that we derive from above, you can also override base class variables/methods here if you wish |
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; | |
//Serializable lets you see it in the inspector | |
[Serializable] | |
public class ItemUpdated | |
{ | |
//Item variables that all items share |