Skip to content

Instantly share code, notes, and snippets.

View JackDraak's full-sized avatar

Jack Draak JackDraak

  • Canada
View GitHub Profile
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DroneController : MonoBehaviour {
Rigidbody rigidbody;
AudioSource audio;
bool thrustAudio = false;
bool thrustAudioOn = false;
@JackDraak
JackDraak / FishDrone.cs
Last active February 16, 2022 17:41
Unity2018 - scripting autonomous fish drones: avoiding obstacles using raycast
/// FishDrone by JackDraak
/// July 2018
/// 'changelog' viewable on GitHub.
///
using UnityEngine;
public class FishDrone : MonoBehaviour
{
private Animator animator;
private float changeDelay, changeTime;
@JackDraak
JackDraak / MouseGimbal.cs
Created November 20, 2018 10:16
Mouse gimbal controller for Unity.
using UnityEngine;
public class MouseGimbal : MonoBehaviour
{
[SerializeField] [Range(0,89)] float maxRotationDegrees = 10.0f; // At 90+ gimbal oddities must be dealt with.
[SerializeField] bool ClampToMaxRotationDegrees = true; // Disable for free rotation.
[SerializeField] float rotationSpeed = 10.0f;
const float fullArc = 360.0f;
const float halfArc = 180.0f;
@JackDraak
JackDraak / Game.py
Last active March 22, 2023 03:03
Python Fifteen Game - console or pyGame GUI
from Tile import Tile
import random
import usage
class Game:
def __init__(self, dimension: int, shuffled: bool):
entropy_factor = 100
self.dimension = dimension
self.blank_label = dimension * dimension