Skip to content

Instantly share code, notes, and snippets.

View partiallyblind's full-sized avatar

Joshua Marshall partiallyblind

View GitHub Profile
@partiallyblind
partiallyblind / TestSkinnedMeshRendererBones.cs
Last active April 26, 2022 09:38
Skinned Mesh Renderer Bones reset from UnityCodeMonkey (https://www.youtube.com/watch?v=nSmEirb8JGM)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TestSkinnedMeshRendererBones : MonoBehaviour {
[SerializeField] private SkinnedMeshRenderer skinnedMeshRendererPrefab;
[SerializeField] private SkinnedMeshRenderer originalSkinnedMeshRenderer;
[SerializeField] private Transform rootBone;
using UnityEngine;
using System.Collections;
public class CoroutinesExample : MonoBehaviour
{
public float smoothing = 1f;
public Transform target;
void Start ()
using UnityEngine;
using System.Collections;
public class PropertiesAndCoroutines : MonoBehaviour
{
public float smoothing = 7f;
public Vector3 Target
{
get { return target; }
set
using UnityEngine;
using System.Collections;
public class ClickSetPosition : MonoBehaviour
{
public PropertiesAndCoroutines coroutineScript;
void OnMouseDown ()
{
using UnityEngine;
using System.Collections;
public class TurnColorScript : MonoBehaviour
{
void OnEnable()
{
EventManager.OnClicked += TurnColor;
}
using UnityEngine;
using System.Collections;
public class TeleportScript : MonoBehaviour
{
void OnEnable()
{
EventManager.OnClicked += Teleport;
}
@partiallyblind
partiallyblind / CameraControl.cs
Created February 17, 2022 20:52 — forked from Jellybit/CameraControl.cs
Super Metroid style camera for Unity3D.
using UnityEngine;
using System.Collections;
// This is basically how the Super Metroid camera worked. Whichever direction you moved, the camera would
// move in the same direction a multiple of the player's speed. Once the center of the camera moved a
// certain distance from the player, the camera would lock on the player and move the same speed. Change
// movement direction, and the camera would once again move more quickly to catch up and place itself
// ahead of the player's movement.
// Super Metroid also had area limits and locked certain axes based on where you were. For instance, if
@partiallyblind
partiallyblind / EasingFunctions.cs
Created February 17, 2022 09:31 — forked from cjddmut/EasingFunctions.cs
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@partiallyblind
partiallyblind / FlyCamera.cs
Created February 17, 2022 09:28 — forked from gunderson/FlyCamera.cs
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@partiallyblind
partiallyblind / capybara cheat sheet
Created September 15, 2016 09:55 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')