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
//This isn't really possible with templates, and even without templates it needs refactoring every time you want to add something new. | |
#include <functional> | |
#include <iostream> | |
#include <string> | |
class Switcher { | |
public: | |
Switcher(std::string s); | |
Switcher(int i); | |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Tilemaps; | |
[RequireComponent(typeof(MapEtcher))] | |
public class GameController : MonoBehaviour { | |
public Tilemap tilemap; //set by the user | |
MapGenerator mapGenerator = new MapGenerator(); | |
MapEtcher mapEtcher; |
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; | |
namespace Ducci { | |
static class DucciSolver { | |
///<summary> | |
///The entry point of the program | |
///</summary> | |
static void Main(string[] args) { |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Blowsnower : MonoBehaviour { | |
//structures | |
public enum Behaviour { | |
IDLE, WANDER, ATTACK, MELTED | |
} |
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 States; | |
class Monster : MonoBehaviour { | |
//AI states | |
public UnityStateMachine<Monster> stateMachine; | |
//components | |
public Animator animator; | |
public Rigidbody2D rigidBody; |
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.Collections; | |
using System.IO; | |
using UnityEngine; | |
[System.Serializable] | |
public class CharacterController2D : MonoBehaviour { | |
BoxCollider2D hitbox; | |
Rigidbody2D rigidBody; | |
public string statisticsFile; |
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
Vector3 targetVector = gameObjectArray[waypoint].transform.position; | |
_navMeshAgent.SetDestination(targetVector); |
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
server { | |
root /var/www/candyraid/public_html; #your files go here | |
index index.html index.htm; | |
server_name localhost candyraid.com www.candyraid.com ""; #your domain name goes here | |
access_log /var/www/candyraid/logs/access.log; #make sure this file exists first! | |
error_log /var/www/candyraid/logs/errors.log; #make sure this file exists first! | |
location / { |
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 FlashColor(float r, float g, float b, float delay) { | |
StartCoroutine(FlashColorInternal(r, g, b, delay)); | |
} | |
IEnumerator FlashColorInternal(float r, float g, float b, float delay) { | |
spriteRenderer.color = new Color(r, g, b); | |
yield return new WaitForSeconds(delay); | |
spriteRenderer.color = new Color(1, 1, 1); | |
} |