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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class AStar : MonoBehaviour | |
{ | |
public enum State | |
{ |
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
def Run(self): | |
self.Reset() | |
open = self.OPEN | |
closed = self.CLOSED | |
start = self._start | |
goal = self._goal | |
open.append(start) | |
print(open) | |
while open: | |
open.sort(key = lambda x : x.f) |
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.IO; | |
using System.Xml.Serialization; | |
namespace MarvelRPG | |
{ | |
public static class Utilities | |
{ | |
public static void SerializeXML<T>(string s, T t, string path) | |
{ | |
if (Directory.Exists(path)) |
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> |
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
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
//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
#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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Student | |
{ |