Skip to content

Instantly share code, notes, and snippets.

View erikfenriz's full-sized avatar
🎯
Focusing

Ernestovich erikfenriz

🎯
Focusing
  • Celle, Germany
View GitHub Profile
@erikfenriz
erikfenriz / FirstPersonCameraRotation.cs
Created January 17, 2024 15:25 — forked from KarlRamstedt/FirstPersonCameraRotation.cs
A simple First Person Camera rotation script for Unity.
using UnityEngine;
/// <summary>
/// A simple FPP (First Person Perspective) camera rotation script.
/// Like those found in most FPS (First Person Shooter) games.
/// </summary>
public class FirstPersonCameraRotation : MonoBehaviour {
public float Sensitivity {
get { return sensitivity; }
@erikfenriz
erikfenriz / README.md
Created April 6, 2021 16:37 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@erikfenriz
erikfenriz / customHooks.js
Last active January 27, 2020 21:33
Custom hooks
// useToggle hook
function useToggle(initialValue = false) {
const [state, setState] = useState(initialValue);
const toggle = () =>{
setState(!state);
}
return [state, toggle]
}
function largestOfFour(arr) {
let maxOfArray = [];
return function iterator(arr){
for (var i = 0; i < arr.length; i++)
if (Array.isArray(arr[i])){
console.log(arr[i]);
iterator(arr[i])
}
else{
@erikfenriz
erikfenriz / animals.html
Last active March 19, 2018 17:30
Animals
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>