Skip to content

Instantly share code, notes, and snippets.

View aprius's full-sized avatar
⛱️
Nếu như lần đầu gặp mặt Ai sẽ vì ai mà quay đầu

Aprius aprius

⛱️
Nếu như lần đầu gặp mặt Ai sẽ vì ai mà quay đầu
View GitHub Profile
@aprius
aprius / edm.json
Last active February 4, 2023 14:56
{
"firebase": {
"source": [
"10.4.0",
"10.3.0",
"10.2.0",
"10.1.1",
"10.1.0",
"10.0.0",
"9.6.0",
@aprius
aprius / Skybox Gradient.shader
Last active December 12, 2022 04:26
Skybox gradient shader unity3d
// Made with Amplify Shader Editor
Shader "Skybox Gradient"
{
Properties
{
_Top("Top", Color) = (1,1,1,0)
_Bottom("Bottom", Color) = (0,0,0,0)
_mult("mult", Float) = 1
_pwer("pwer", Float) = 1
[Toggle(_SCREENSPACE_ON)] _Screenspace("Screen space", Float) = 0
using System;
using UnityEngine;
/// <summary>
/// observer : đạt thành tựu thu thập đủ 10000 coin
/// </summary>
public class CoinArchivementObserver : MonoBehaviour
{
private void Awake()
{
using UnityEngine;
public class BlinkSample1 : MonoBehaviour
{
[SerializeField] private Renderer target;
[SerializeField] private float cycle = 1;
private float _time;
private void Update()
public class AudioManager: Singleton<AudioManager>
{
// ...
}
@aprius
aprius / delete-all-tag.sh
Created November 8, 2022 03:50
delete all local and remote tag of repo
#Delete all local tags.
git tag -d $(git tag -l)
#Fetch remote tags.
git fetch
#Delete all remote tags.
git push origin --delete $(git tag -l)
#Delete all local tags.
git tag -d $(git tag -l)
@aprius
aprius / Door.cs
Last active November 2, 2022 19:51
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace DesignPatterns.DIP
{
public class Door : MonoBehaviour, ISwitchable
{
private bool isActive;
public bool IsActive => isActive;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace DesignPatterns.ISP
{
// Using Interface Segregation, we only implement what interfaces apply.
public class EnemyUnit : MonoBehaviour, IDamageable, IMovable, IUnitStats
{
@aprius
aprius / Car.cs
Last active November 2, 2022 18:31
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace DesignPatterns.LSP
{
public class Car : RoadVehicle{}
}
using UnityEngine;
namespace DesignPatterns.OCP
{
public class AreaCalculator
{
// new implementation: use open-closed principle
// let each Shape contain the logic for calculating the area
public float GetArea(Shape shape)