Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameStateManager : MonoBehaviour
{
public playerControls player1;//player reference
public TileMapGenerator _mapGen;//map generator reference
public List<GameObject> Spheres;//list of sphere that should be off
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class tileControl : MonoBehaviour
{
// Start is called before the first frame update
public string tileType;//if its lava if its grass etc
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GenCubeEffects : MonoBehaviour
{
public string genEffect;//name of the genCubeEffect (what happens when the cibe hits a tile is it turned to grass, spawn a enemy etc)
private void OnCollisionEnter(Collision objectHit)
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GenCubeExplode : MonoBehaviour
{
public float radius = 1.0F;//Radius of explosion becareful how far apart you set object they can be caught in this explosion
public float power = 10.0F;//power applied to objects hit
void Start()
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TileMapGenerator : MonoBehaviour
{
public int xTiles, zTiles, yTiles;//basic length,width,height variable to do math on how many total tiles to cerate
public GameObject tilePrefab;//prefab of basic tile were creating
public Transform spawnPosition;//original position of where tiles get created to
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class gunShooting : MonoBehaviour
{
public playerControls _playerControls;//reference to playerControls script on player
public GameObject _bulletPrefab;//prefab of object were going to spawn
public Transform _bulletSpawnPoint;//position of where to spawn bullets to map
public float bulletSpeed;//speed of bullets on shoot
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class playerControls : MonoBehaviour
{
public gunShooting _gunShooting; // class reference to gunShooting script connected to player
public float moveSpeed, jumpHeight; //player move speed and height of jumps
public bool isGrounded, canJump;//is player grounded and can he jump currently
public float zMovement, xMovement;//current input on Z and X axis
@DB-009
DB-009 / Player.cs
Created February 6, 2017 06:54
Source Code for frontStyle movement
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
public GameStateManager gameStateManager;
public float playerSpd, fwdSpd, sidSpd, jumpHeight;
public bool isGrounded;
@DB-009
DB-009 / ControlledStage Genrator
Created March 19, 2016 01:06
hey bud check it out Ive got a few function in here but the important one is generate BGMap (I also have a border generation script that wraps objects around stage)
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
//_DB reality jam contest
//projest started: 10:45 am 12/31/15
public class controlledStageGenerator : MonoBehaviour
{
@DB-009
DB-009 / PlayerMove.cs
Created February 17, 2016 21:42
Dash script made by gadonj18 in #unity3d irc on freenode
using UnityEngine;
using System.Collections;
public class PlayerMove : MonoBehaviour {
Vector3 moveDir;
Rigidbody rb;
float speed = 5f;
float dashCooler = 0.5f;
KeyCode dashKey;
bool dashing = false;