Skip to content

Instantly share code, notes, and snippets.

View danamuise's full-sized avatar

Dana Muise danamuise

View GitHub Profile
@danamuise
danamuise / gist:5476172
Last active December 16, 2015 18:09
C++ Class example: Overloaded Constructor, member function defined outside of the class, an object deifined with default constructor.
#include <iostream>
using namespace std;
class Distance
{
public:
//Overloaded constructor example
//constructor with no args (default values)
@danamuise
danamuise / EndangeredSpecies_H.h
Created April 29, 2013 08:23
COMP130 Term Project 4/29/2013 Function header file
/******************************* HEADER FILE ********************************************************
File: EndangeredSpecies_H.h
Name: Dana Muise
Date: 4/29/2013
Purpose: Function construtors for Endagered Species application
The Endangered Species Application opens a text file named "animals.txt" and displays the a list of endagered animals.
Three attributes are displayed: Name, population and species. The following actions are possible:
-Display the list
-Modify selected attributes of list members
@danamuise
danamuise / EndagererSpecies_Functions.cpp
Last active December 16, 2015 18:49
Comp130 Term project 4/29/2013 Function Definitions.cpp
/******************************* DRIVER ********************************************************
File: EndagererSpecies_Functions.cpp
Name: Dana Muise
Date: 4/29/2013
Purpose: Functions for Endagered Species application
*/
#include <iostream>
#include <ctype.h>
@danamuise
danamuise / gist:5480410
Created April 29, 2013 08:38
Comp130 Term Project 4/29/2013 Driver file
/******************************* DRIVER FILE ********************************************************
File: EndagererSpecies_Driver.cpp
Name: Dana Muise
Date: 4/29/2013
*/
#include <iostream>
#include "EndageredSpecies_H.h"
using namespace danaMuise;
using UnityEngine;
using System.Collections;
/*
This script controls generic non-player characters with NavAgent component that walk around the
envronment, visiting waypoints and avoiding collisions.
*/
public class Generic_NonPlayer : MonoBehaviour {
private GameObject[] wayPoints;
using UnityEngine;
using System.Collections;
/*
This script controls generic non-player characters that follow another character.
*/
public class Follow_NonPlayer : MonoBehaviour {
Animator anim;
NavMeshAgent agent;
@danamuise
danamuise / MyPokerGame.java
Created January 10, 2017 22:59
Console based poker game in Java
package PJ4;
import java.util.*;
/* A Console based poker game by Dana Muise (SFSU 913048115) 6/2016
* This is the main poker game class.
* It uses Decks and Card objects to implement poker game.
*/
public class MyPokerGame {
@danamuise
danamuise / Glass.shader
Last active January 10, 2017 23:03
Custom Unity Shaders
Shader "PACKT/Glass" {
// Custom glass shader by Dana Muise
// Mutli pass functions provide transparent effects on both sides of geometry.
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
@danamuise
danamuise / InstanceAdd.cs
Last active May 5, 2018 19:08
Unity C# instantiates a child object at run time based on frequency or usage. This improves performance, as it can be used to instantiates particle effects only when they are needed, also reduced particle emissions when frame rate drops below a specified amount.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ProjectKing {
/**
//Add this script to a gameobject that you would like to instantiate a particle effect object
//Also optimizes particle emmisions based on frame rate drop
//
**/
@danamuise
danamuise / Classic Snake game in JS
Last active October 20, 2021 04:50
the classic snake game in javascript
<html>
<head>
<title>Snake Game</title>
<style>
canvas{
display: block;
margin: 0 auto;
}
</style>
</head>