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 System.Collections; | |
using UnityEngine; | |
public class CameraShake : Singleton<CameraShake> | |
{ | |
public AnimationCurve m_MagnitudeCurve; | |
public void ShakeOnce(float duration, float magnitude) | |
{ | |
StartCoroutine(Shake(duration, magnitude)); |
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 UnityEngine.UI; | |
public class GamepadTester : MonoBehaviour | |
{ | |
public int m_NumSticks; | |
public Text m_Joysticks; | |
public Text[] m_InputText; | |
public Text[] m_ButtonText; |
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 UnityEngine.UI; | |
[ExecuteInEditMode] | |
[RequireComponent(typeof(RawImage))] | |
public class GradientUI : MonoBehaviour | |
{ | |
private RawImage m_Image; | |
private Texture2D m_Texture; | |
public Color m_StartColor; |
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; | |
public class PingPongUI : MonoBehaviour | |
{ | |
public float m_Range = 0.05f; | |
public float m_SmoothTime = 10.0f; | |
public Vector3 m_Axis = Vector3.up; | |
private Vector3 m_StartPosition; |
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; | |
[RequireComponent(typeof(CanvasGroup))] | |
public class BlinkUI : MonoBehaviour | |
{ | |
public float m_SmoothTime = 1.0f; | |
private CanvasGroup m_CanvasGroup; | |
private void Awake() | |
{ |
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
import 'dart:convert'; | |
class ResultCep { | |
String cep; | |
String logradouro; | |
String complemento; | |
String bairro; | |
String localidade; | |
String uf; | |
String unidade; |
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
import 'package:http/http.dart' as http; | |
import 'package:search_cep/models/result_cep.dart'; | |
class ViaCepService { | |
static Future<ResultCep> fetchCep({String cep}) async { | |
final response = await http.get('https://viacep.com.br/ws/$cep/json/'); | |
if (response.statusCode == 200) { | |
return ResultCep.fromJson(response.body); | |
} else { | |
throw Exception('Requisição inválida!'); |
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
import 'package:emprestimo_objetos/models/stuff.dart'; | |
import 'package:path/path.dart'; | |
import 'package:sqflite/sqflite.dart'; | |
class StuffProvider { | |
static final StuffProvider _instance = StuffProvider.internal(); | |
factory StuffProvider() => _instance; | |
StuffProvider.internal(); |
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
final String tableStuff = 'stuff'; | |
final String columnId = '_id'; | |
final String columnDescription = 'stuffDescription'; | |
final String columnPicture = 'stuffPicture'; | |
final String columnDepartureDate = 'stuffDepartureDate'; | |
final String columnReturnDate = 'stuffReturnDate'; | |
final String columnFriendName = 'friendName'; | |
final String columnFriendPhone = 'friendPhone'; | |
class Stuff { |
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; | |
public class Drawbridge : MonoBehaviour | |
{ | |
public float[] m_Targets = { 90.0f, 0.0f }; | |
private int m_Index = 0; | |
private HingeJoint m_Joint; | |
private void Awake() | |
{ |
NewerOlder