Skip to content

Instantly share code, notes, and snippets.

var i = 0;
var myArray = [1,2,3,4,5];
document.write('While Loop:<br>');
while(i < 5)
{
document.write(myArray[i]);
i = i+1;
}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form action="file:///C:/Users/and0n/eclipse-workspace/My%20Website%20Project/server_demo.html">
@and0ne808
and0ne808 / just-responsive-css.css
Created August 4, 2017 12:56
Very Simple Responsive CSS Code
/* AMPDREW RESPONSIVE LAYOUT STYLING */
.ampd-section {
overflow: auto;
width:100%;
}
.ampd-row {
padding:10px;
margin: 0 auto;
max-width:1000px;
@and0ne808
and0ne808 / .htaccess
Created August 4, 2017 04:12
Force HTTPS on your website. Put this in the root.
#Force HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
@and0ne808
and0ne808 / cameraSwitch.cs
Created August 4, 2017 02:47
Take Flight with GDD Camera Switch Logic
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class cameraSwitch : MonoBehaviour {
public Camera cam1;
public Camera cam2;
public GameObject UI;
@and0ne808
and0ne808 / AndrewPlayerController.cs
Created August 4, 2017 02:43
Take Flight with GDD Lazer Shooting Logic
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AndrewPlayerController : MonoBehaviour {
public bool canShoot; //Can the player shoot?
public float shootInterval; // Amount of time in seconds between shots
public float currentTime;
@and0ne808
and0ne808 / PickupController.cs
Created August 4, 2017 02:40
Take Flight with GDD Game Pickup Manager
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class PickupController : MonoBehaviour {
public bool gdd1100;
public bool gdd2100;
@and0ne808
and0ne808 / PickupControllerMedium.cs
Created August 4, 2017 02:35
Take Flight with GDD Pickup Controller for Medium Difficulty
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class PickupControllerMedium : MonoBehaviour {
public bool gdd1100;
public bool gdd2100;
public bool gdd2150;
public bool gdd1200;
public bool cs3350;
@and0ne808
and0ne808 / UFOScript.cs
Last active August 4, 2017 02:35
Take Flight with GDD Script that controls how UFO Enemies Behave
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UFOScript : MonoBehaviour {
public float rotationSpeed;
public float movementSpeed;
public float distanceThreshold; // closeness to Waypoint before switching trajectory
@and0ne808
and0ne808 / Chopper3.cs
Created August 3, 2017 05:17
NOE Flight Sim Helicopter Script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Chopper3 : MonoBehaviour {
float forwardAccel; // Forward Acceleration
public float forwardVelocity; // Velocity in the forward direction
public float forwardVelocityMultiplier; // Multiplier for forward velocity 0.0005 is working great