Skip to content

Instantly share code, notes, and snippets.

View Kwintenvdb's full-sized avatar

Kwinten Van den Berghe Kwintenvdb

View GitHub Profile
@Kwintenvdb
Kwintenvdb / Example.vue
Last active July 2, 2020 08:56
Request wrapper / loading wrapper
<template>
<div>
<loading-wrapper :request="fetchJobs">
This will only be displayed once the request is done, and will be hidden again if the request is triggered again.
<div v-for="job in jobs">{{ job.name }}</div>
</loading-wrapper>
</div>
</template>
<script lang="ts">
using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
[ExecuteInEditMode]
public class CurvedText : Text
{
[SerializeField]
private Transform target;
[Range(-1, 1)]
049aa1d1a2047ea27021e38a54e4ca376f5d047ce7a870f62527f00439ad2a750bdfc8ae35a42e7fc641f1e7c696e522bab27b1cdfa42a5ac802aa0ba9337bb309;leonlxli
using System.Collections.Generic;
using UnityEngine;
public class Pool<T> where T : Component
{
private Transform _poolGameObjectTransform;
private T _prefab;
private readonly Queue<T> _pooledObjects = new Queue<T>();
public static Pool<T> CreatePool(T prefab)