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
//Not push first OnNext same ReactiveProperty<T>
//Debug.Log("HAHAHA : " + _); not run until Method ChangeCurrent() Call
private SubjectProperty<int> _current = new SubjectProperty<int>();
private IDisposable _disposable;
public void Start()
{
_disposable = _current.Subscribe(_ =>
{
if (_current.Value > 10)
@aprius
aprius / TrafficLightAttribute.cs
Created June 13, 2019 09:53 — forked from LotteMakesStuff/TrafficLightAttribute.cs
TrafficLight control/layout/property drawer: Adds a new editor control that draws lil Traffic Lights in the inspector. its really useful for visualizing state. For example, checkboxes can be hard to read at a glace, but a Red or Green status light is easy! Recommend you use the attached package, as it has all the icon image files.
// Non Editor code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class TrafficLightAttribute : PropertyAttribute
{
public bool DrawLabel = true;
public string CustomLabel;
public bool AlsoDrawDefault;
@aprius
aprius / introrx.md
Created June 13, 2019 15:33 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
*NameSpace  : UpperCameICase
        
public namespace UnityModule.Sunflower
{
    
}
        
        
*Interface  : IUpperCameICase
@aprius
aprius / LazyUniTask.cs
Last active December 2, 2022 02:15 — forked from yKimisaki/LazyUniTask.cs
add method extend for IResourceLocation
#if CSHARP_7_OR_LATER
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.ResourceLocations;
using UnityEngine.ResourceManagement.ResourceProviders;
using UnityEngine.SceneManagement;
#!/bin/bash
set -ue
HOST="gitlab.com"
TYPE="git"
GROUP="yenmoc"
AUTHOR="yenmoc"
LICENSE="MIT"
YEAR=2019
@aprius
aprius / LICENSE.txt
Created July 31, 2019 04:10
LICENSE
MIT License
Copyright (c) 2019 yenmoc
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
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@aprius
aprius / .gitignore
Last active November 5, 2022 10:21
Unity gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# =============== #
# Unity generated #
@aprius
aprius / update_git_repos.sh
Last active November 27, 2019 15:52 — forked from douglas/update_git_repos.sh
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "Pulling in latest changes for all repositories..."
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
using System.Linq;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace Unity.Linq
{
public static class TraverseExtension
{
public static Vector3 TotalPositionAncestor(this GameObject origin, int level)
{