Skip to content

Instantly share code, notes, and snippets.

View monsieurh's full-sized avatar

ahub monsieurh

  • France
View GitHub Profile
@monsieurh
monsieurh / GameCamera.cs
Created June 6, 2019 15:54
La camera des jeux d'action !
using UnityEngine;
[RequireComponent(typeof(Camera))]
public class GameCamera : MonoBehaviour
{
[Header("Runtime attributes")] [Tooltip("The point the camera is looking at")]
public Transform cameraTarget;
[Tooltip("The point the camera is going to")]
public Transform cameraAnchor;
@monsieurh
monsieurh / proposition.py
Created December 12, 2017 14:51
screen abstraction proposition for ZPUI
class MyApp:
def __init__(self, o):
# type: (AbstractScreen) -> None
self.o = o
self.my_loading_bar = LoadingBar(o) # As an app developper I don't wanna know what the screens are !
def on_start(self):
self.my_loading_bar.activate()
@monsieurh
monsieurh / WeightedRandom.cs
Created June 27, 2017 14:51
WeightedRandom.cs
using System;
using System.Collections;
using System.Collections.Generic;
using Random = UnityEngine.Random;
// ReSharper disable UnusedMember.Global
// ReSharper disable MemberCanBePrivate.Global
namespace Utils
{
public class WeightedRandomizer<T> : IEnumerable
@monsieurh
monsieurh / shuffler.cs
Last active July 19, 2017 11:54
Shuffles a list in C# (Unity compatible)
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Utils
{
/// <summary>
/// Implements "iTunes shuffle" that is to say, it's a random where you can't get twice the same value unless you
/// already got all the values.
@monsieurh
monsieurh / NOTES.md
Last active February 1, 2017 08:43
Unity Daydream VR Notes

Performances

  • 2xAA
  • Disable real time shadows
  • Disable "Use 32-bit Display Buffer"
  • Stick with Forward or Vertex rendering
  • Enable Multithreaded Rendering
  • Enable Static and Dynamic batching
  • Graphic Jobs MAY improve performance Source
@monsieurh
monsieurh / lutim.py
Created July 22, 2016 10:44
Uploads an image to LUTIM (http://lut.im/)
#!/usr/bin/env python3
import argparse
import os
import sys
import requests
from bs4 import BeautifulSoup