Skip to content

Instantly share code, notes, and snippets.

@DB-009
DB-009 / generators.cs
Last active November 4, 2015 03:56
Source code for simple coin generator for 2.5 D platformer series
using UnityEngine;
using System.Collections;
public class generators : MonoBehaviour {
public GameObject objType1;
public GameObject objType2;
public Transform spawnPoint;
@DB-009
DB-009 / SpawnManager.cs
Last active November 4, 2015 03:57
Source code for simple enemy spawn system for 2.5D platformer game
using UnityEngine;
using System.Collections;
public class SpawnManager : MonoBehaviour {
public GameObject objtype1;
public Transform spawnPos;
public int maxSpawns,curSpawns;
@DB-009
DB-009 / FixedMovement.cs
Last active November 4, 2015 03:57
Player Controls for Prototype #2 2.5 Fixed shooter
using UnityEngine;
using System.Collections;
public class FixedMovement : MonoBehaviour {
public float verSpd;
public float horSpd;
@DB-009
DB-009 / PlayerControl.sc
Last active November 4, 2015 03:58
Player Control for 3d Flight protoype
using UnityEngine;
using System.Collections;
public class PlayerControl : MonoBehaviour {
public float verSpd;
public float horSpd;
@DB-009
DB-009 / DateTime_timer.cs
Last active November 4, 2015 04:00
Timer for Unity c# using DateTime class
using UnityEngine;
using System.Collections;
using System;
public class DateTime_timer : MonoBehaviour {
public DateTime dt_TimeStarted;//time started
public double dt_CurTime;// (TimeStarted - Current Time) = time since code started ..
@DB-009
DB-009 / Timers.cs
Created October 2, 2015 10:10
3 Timers in one script, for unity c#
using UnityEngine;
using System.Collections;
using System;
public class Timers : MonoBehaviour {
public float myTimer;//First timer variable
@DB-009
DB-009 / PlatformControls.cs
Created September 9, 2015 01:58
PlatformControls for 2d Unity Game in c#
using UnityEngine;
using System.Collections;
public class PlatformControls : MonoBehaviour {
//Boolean variables can be true or false you'd use this to see wheather something is happening or a variable is set.
public bool isGrounded;//is my player colliding with the floor?
public bool isJumping;//is my player jumping or can he jump?
$start_d = Input::get('start_d');
$end_d= Input::get('end_d');
$end_d = date('Y-m-d', strtotime(str_replace('/', '-', $end_d)));
$end_d = Carbon::createFromFormat('Y-m-d H', $end_d)->toDateTimeString();
$start_d = date('Y-m-d', strtotime(str_replace('/', '-', $start_d)));
$start_d = Carbon::createFromFormat('Y-m-d H', $start_d)->toDateTimeString();
if($validator->fails()){
return Response::json(['error' => 1,
'msg'=>$validator->errors()
]);
}
else{
<form action="{{ URL::to('/users/editprofile') }}" role="form" name="editprofile" id="editprofile" class="form-horizontal form-border" method="POST" accept-charset="utf-8">
<div style="display:none;">
<input type="hidden" name="_method" value="POST"/>
<input type="hidden" name="user_id" class="form-control" id="UserUserId" value='{{$user->user_id}}'/>
</div>
REST OF THE FORM HERE
</form>