This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine.Events; | |
using System.Reflection; | |
namespace Test | |
{ | |
[CustomPropertyDrawer (typeof (UnityEventBase), true)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyBehavior : MonoBehaviour { | |
// This will store the string value | |
[StringInList("Cat", "Dog")] public string Animal; | |
// This will store the index of the array value | |
[StringInList("John", "Jack", "Jim")] public int PersonID; | |
// Showing a list of loaded scenes | |
[StringInList(typeof(PropertyDrawersHelper), "AllSceneNames")] public string SceneName; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private IEnumerator UpdateCoinsAmount (int prevCoins, int newCoins) | |
{ | |
// Animation for increasing and decreasing of coins amount | |
const float seconds = 0.5f; | |
float elapsedTime = 0; | |
while (elapsedTime < seconds) { | |
CurrentCoinsText.text = Mathf.Floor(Mathf.Lerp (prevCoins, newCoins, (elapsedTime / seconds))).ToString(); | |
elapsedTime += Time.deltaTime; | |
yield return new WaitForEndOfFrame (); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader | |
== Shell |