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; | |
using UnityEngine.UI; | |
public class Sleep_Clickable : ClickableParent | |
{ | |
//DaycountManager is the manager that handles specifically the days system | |
public DayCountManager DayManager; |
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 Populator_Manager : MonoBehaviour | |
{ | |
//IMPORTANT: Dynamic means objects that can be interacted with (Zombies, Crates, etc.) Static means objects that can't be interacted with like grass or trees | |
//Here we have the four populators we created. We create a reference to each one so we can easily access them. |
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 Zombie_Populator : MonoBehaviour { | |
//This determines how many packs of zombies will be spawned IE; how many clusters around the map, not how many zombie gameobjects | |
public int PackNumber; | |
//This determines how many zombie gameobjects are in each pack of zombies |
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 Crate_Populator : MonoBehaviour | |
{ | |
//This list holds the crate prefabs we can spawn. | |
public List<GameObject> CrateSpawnables = new List<GameObject>(); |
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 Detail_Populator : MonoBehaviour | |
{ | |
//These two variables control how far the objects could potentially be placed. | |
//Ex. If these two variables were set to 20, the the farthest an object could be placed is at (20,0,20) | |
public float EndRangeX; |
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 Crate : ClickableParent | |
{ | |
public List<GameObject> ItemsInside = new List<GameObject>(); //A list is a collection of objects that can be accessed through a numbered list. In this case it holds our prefabs (Picture 1) | |
public int NumberOfItemsToSpawn; //This decides how many times we loop in OnClick(); IE it decides how many objects to spawn | |
public float MinimumDistance; | |
public AudioClip Clip; |
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 WaterScript : ClickableParent { | |
public string Name; | |
public float water_Value; | |
public float MinimumDistance; | |
private Player_Manager Master_Manager; |
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; | |
[System.Serializable] | |
public class FoodScript : ClickableParent { | |
public string Name; | |
public float food_Value; | |
public float MMinimumDistance; |
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 Modifier_Manager : MonoBehaviour | |
{ | |
public Player_Manager Player; //Every modifier needs a Player_Mangager, so we create one here instead of getting it for each modifier | |
public List<Modifier_Template> Debuffs = new List<Modifier_Template>(); //We create a list of modifiers |
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; | |
//Notice how this class doesnn't inherit from Monobehaviour. This means we can't add this to gameobjects | |
public abstract class Modifier_Template | |
{ | |
//By making all of these abstract, we force every modifier to have these functions | |
public abstract float Attribute { get; set; } //This is a property. We're essentially force every child to have a float number variabled named Attribute | |
//This attribute property usage depends on the modifier, but generally, it tells the modifier by how much to change a stat in Player_Manager |