Skip to content

Instantly share code, notes, and snippets.

import UIKit
class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var txtInput: UITextField!
@IBOutlet weak var txtOutput: UITextView!
var items:[String] = []
//
// menuScreen.swift
// SheepCounter
//
// Created by Roxanne Farkas on 2/17/17.
// Copyright © 2017 newschool. All rights reserved.
//
import SpriteKit
//
// GameScene.swift
// SheepCounter
//
// Created by Roxanne Farkas on 2/11/17.
import SpriteKit
import GameplayKit
//set global variable
ballToMouse = new Ray (ballPos.transform.position, Vector3.zero);
forceDir.z = 0f;
if (Input.GetMouseButtonDown (0)) {
mouseOrigin = Camera.main.ScreenToWorldPoint (Input.mousePosition);
mouseOrigin.z = 0f;
isPanning = true;
} else if (isPanning) {
Vector2 mouseDist = currentPos - mouseOrigin;
@loldi
loldi / newcamlai.cs
Last active December 31, 2016 00:03
camera movement script akin to the unity editor camera
public float panSpeed = 4.0f;
private Vector3 mouseOrigin;
private bool isPanning;
private Vector3 initialPosition;
private Vector3 initialRotation;
private Vector3 currentPosition;
float yRotation;
float xRotation;
float rotationSpeed = 200.0f;
using UnityEngine;
using System.Collections;
public class cameraBehavior : MonoBehaviour {
public float ScrollSpeed = 15;
public GameObject target;
override func viewDidLoad() {
}
override func motionBegan(_ motion: UIEventSubtype,
with event: UIEvent?){
print("moved")
@loldi
loldi / pls.py
Created September 13, 2016 18:01
whoBy = raw_input("WHO IS SENDING THIS SPOOPY EMAIL??: ")
replyPrompt = raw_input("WHAT MESSAGE DO YOU WANT BACK???: ")
timeResponse = raw_input("HOW MUCH TIME DO THEY HAVE???: ")
orElse = raw_input("WHAT ARE THE CONSEQUENCES???: ")
body = "YOU HAVE BEEN EMAILED BY " , whoBy ,", REPLY WITH " , replyPrompt , " IN " , timeResponse , " SECONDS OR " , orElse
msg.attach(MIMEText(body, 'plain'))