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 Oscillator : MonoBehaviour | |
{ | |
public Vector3 m_Axis = Vector3.up; | |
public float m_Range = 0.3f; | |
public float m_SmoothTime = 2.0f; | |
private Vector3 m_OriginPosition; | |
private void Start() |
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 Detonator : MonoBehaviour | |
{ | |
public Explosion m_ExplosionScript; | |
private void Update() | |
{ | |
if (Input.GetButtonDown("Fire1")) | |
{ |
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 Explosion : MonoBehaviour | |
{ | |
public float m_Force = 1000.0f; | |
public float m_Radius = 10.0f; | |
public float m_UpForce = 600.0f; | |
public LayerMask m_ColliderMask; | |
public void Explode() |
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 : MonoBehaviour | |
{ | |
public static CameraShake Instance { get; private set; } | |
public void Awake() | |
{ | |
if (Instance != null) |
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 MapBuilder : MonoBehaviour | |
{ | |
public GameObject m_TilePrefab; | |
public float m_MinHeight = 0.0f; | |
public float m_MaxHeight = 0.05f; | |
public int m_Size = 20; | |
private void Start() | |
{ | |
for (int z = 0; z < m_Size; z++) |
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 ChangeColor : MonoBehaviour | |
{ | |
public Color m_MinColor = Color.white; | |
public Color m_MaxColor = Color.white; | |
private Renderer m_Renderer; | |
private void Start() | |
{ |
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:flutter/material.dart'; | |
void main() => runApp( | |
MaterialApp( | |
home: Home(), | |
debugShowCheckedModeBanner: false, | |
), | |
); | |
class Home extends StatefulWidget { |
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
TextEditingController _weightController = TextEditingController(); | |
TextEditingController _heightController = TextEditingController(); | |
TextFormField buildTextFormField({TextEditingController controller, String error, String label}) { | |
return TextFormField( | |
keyboardType: TextInputType.number, | |
decoration: InputDecoration(labelText: label), | |
controller: controller, | |
validator: (text) { | |
return text.isEmpty ? error : null; |
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 BreakoutPaddle : MonoBehaviour | |
{ | |
// Velocidade do movimento | |
public float m_Speed = 20.0f; | |
private Rigidbody m_Body; | |
private void Start() | |
{ |
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(Rigidbody))] | |
public class BreakoutBall : MonoBehaviour | |
{ | |
// Força inicial da bola | |
public float m_Force = 1000.0f; | |
// Referência para o corpo rígido | |
private Rigidbody m_Body; |