Skip to content

Instantly share code, notes, and snippets.

View keyboardhide.swift
import UIKit
class ViewController: UIViewController, UITextFieldDelegate {
@IBOutlet weak var txtInput: UITextField!
@IBOutlet weak var txtOutput: UITextView!
var items:[String] = []
View menubutton.swift
//
// menuScreen.swift
// SheepCounter
//
// Created by Roxanne Farkas on 2/17/17.
// Copyright © 2017 newschool. All rights reserved.
//
import SpriteKit
View laserZees.swift
//
// GameScene.swift
// SheepCounter
//
// Created by Roxanne Farkas on 2/11/17.
import SpriteKit
import GameplayKit
//set global variable
View ballshoot.cs
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 Dec 31, 2016
camera movement script akin to the unity editor camera
View newcamlai.cs
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;
View cameramove.cs
using UnityEngine;
using System.Collections;
public class cameraBehavior : MonoBehaviour {
public float ScrollSpeed = 15;
public GameObject target;
View elizabeth.swift
override func viewDidLoad() {
}
override func motionBegan(_ motion: UIEventSubtype,
with event: UIEvent?){
print("moved")
View pls.py
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'))