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; | |
public class GridGenerator : MonoBehaviour | |
{ | |
[SerializeField] | |
private GameObject _gridPrefab; | |
public int rows; | |
public int cols; |
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; | |
public enum SpringType | |
{ | |
manhattan, | |
structural, | |
shear, | |
bend |
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
public bool IsColliding (GameObject a, GameObject b) | |
{ | |
Vector3 minA = a.GetComponent<AABB> ().Min; | |
Vector3 maxA = a.GetComponent<AABB> ().Max; | |
Vector3 minB = b.GetComponent<AABB> ().Min; | |
Vector3 maxB = b.GetComponent<AABB> ().Max; | |
bool xColliding = false; | |
bool yColliding = false; | |
bool zColliding = false; |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Student | |
{ |
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
#define GLM_FORCE_PURE | |
#include <vector> | |
#include "stdio.h" | |
#include <gl_core_4_4.h> | |
#include <GLFW/glfw3.h> | |
#include <glm/fwd.hpp> | |
#include <glm\glm.hpp> | |
#include <glm\ext.hpp> | |
#include <iostream> | |
#include <fstream> |
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
#define GLM_FORCE_PURE | |
#include <vector> | |
#include "stdio.h" | |
#include <gl_core_4_4.h> | |
#include <GLFW/glfw3.h> | |
#include <glm/fwd.hpp> | |
#include <glm\glm.hpp> | |
#include <glm\ext.hpp> | |
#include <iostream> | |
#include <fstream> |
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
//written by Ryan adaire aka the boss aka commit dis aka ya boy aka holla at | |
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class FSM<T> | |
{ | |
private List<TransitionObject> good_transitions; |
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
void BringTheNoise() | |
{ | |
/* | |
To start with, we will be using glm’s perlin noise function to generate our noise instead of | |
implementing our own. The glm function simply takes in a vec2 and returns a float between -1 and 1. | |
Before just passing in our x and y we want to make some changes to them. First, we scale our point | |
down, in this case by 10. This is because Perlin noise always returns 0 on integer boundaries. The | |
Perlin noise function also returns a number between -1 and 1. For our height map we want a | |
number between 0 and 1 so we can later multiply it by our max height. To do this we multiply by 0.5 |
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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
public interface IDamageable | |
{ | |
void TakeDamage(int totalDamage); | |
} | |
class Wall : IDamageable |
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 System; | |
using System.Collections.Generic; | |
public interface IDamager | |
{ | |
/// <summary> | |
/// OUTGOING DAMAGE | |
/// </summary> | |
/// <returns>return how much damage was SENT</returns> |
OlderNewer