Commit c1cd6645 authored by Talita Halboth's avatar Talita Halboth

update de coisa

parent 84cfcea0
This diff is collapsed.
......@@ -8,131 +8,120 @@ Material:
m_PrefabInternal: {fileID: 0}
m_Name: Oil
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: 0.5
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: 0.5
data:
first:
name: _Metallic
second: 0
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _Parallax
second: 0.02
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
- first:
name: _BumpScale
second: 1
- first:
name: _Cutoff
second: 0.5
- first:
name: _DetailNormalMapScale
second: 1
- first:
name: _DstBlend
second: 0
- first:
name: _GlossMapScale
second: 1
- first:
name: _Glossiness
second: 0.5
- first:
name: _GlossyReflections
second: 1
- first:
name: _Metallic
second: 0
- first:
name: _Mode
second: 0
- first:
name: _OcclusionStrength
second: 1
- first:
name: _Parallax
second: 0.02
- first:
name: _SmoothnessTextureChannel
second: 0
- first:
name: _SpecularHighlights
second: 1
- first:
name: _SrcBlend
second: 1
- first:
name: _UVSec
second: 0
- first:
name: _ZWrite
second: 1
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
data:
first:
name: _Color
second: {r: 0.20112458, g: 0.21342319, b: 0.45588237, a: 1}
- first:
name: _Color
second: {r: 0, g: 0.543205, b: 0.7647059, a: 0.472}
- first:
name: _EmissionColor
second: {r: 0, g: 0, b: 0, a: 1}
#pragma strict
var bolinha: GameObject;
function Start () {
transform.position.x = (Random.value) * 10;
}
function Update () {
}
\ No newline at end of file
#pragma strict
#pragma strict
//var objeto: GameObject;
var a: float;
var rb: Rigidbody;
static var rb: Rigidbody;
static var molApolar: boolean ;
static var molPolar:boolean ;
var water : Material;
......@@ -11,8 +11,8 @@ var oil : Material;
// no prototipo a cor vermelha representa polar e a preta apolar
function Start () {
rb = GetComponent.<Rigidbody>();
rb.velocity = Vector3(0, -2, 0);
a = Random.value;
// rb.velocity = Vector3(0, -2, 0);
/*a = Random.value;
if (a < 0.5)
{
GetComponent.<Renderer>().material.CopyPropertiesFromMaterial(water);
......@@ -24,37 +24,21 @@ function Start () {
GetComponent.<Renderer>().material.CopyPropertiesFromMaterial(oil);
molPolar = true ;
molApolar = false ;
}
transform.position.x = Random.Range(-9,9);
}*/
//transform.position.x = Random.Range(-9,9);
}
function polaridade ()
{
if (a < 0.5)
{
GetComponent.<Renderer>().material.CopyPropertiesFromMaterial(water);
molApolar = true ;
molPolar = false ;
}
else
{
GetComponent.<Renderer>().material.CopyPropertiesFromMaterial(oil);
molPolar = true ;
molApolar = false ;
}
}
function Update () {
if ((transform.position.y < -4 )|| (ColisaoPolar.destroi))
{
rb.velocity = Vector3(0, -2, 0);
// rb.velocity = Vector3(0, -2, 0);
a = Random.value;
polaridade ();
//polaridade ();
// transform.GetComponent.<Renderer>().material.color = RandomColor();
transform.position.y = 4;
transform.position.x = Random.Range(-9,9);
transform.position.z = 0;
// transform.position.y = 4;
// transform.position.x = Random.Range(-9,9);
//transform.position.z = 0;
ColisaoPolar.destroi = false;
}
}
#pragma strict
var cor: Color;
var pontos: int ;
var a: float;
var clock : float = 0;
static var destroi : boolean;
pontos = 0 ;
function Start () {
destroi = false;
}
function Update(){
clock+=Time.deltaTime;
}
function OnCollisionEnter (col: Collision)
{if(clock >=0.1){
Debug.Log(pontos);
if (col.gameObject.name == "Player")
{
if (SegueMouse.polar && caiGota.molPolar)
{
pontos++ ;
clock= 0;
destroi = true;
}
else {
if (!SegueMouse.polar && caiGota.molApolar)
{
pontos++ ;
clock = 0;
destroi = true;
}
else
{
print(transform.gameObject.GetComponent.<Rigidbody>().velocity.y);
var rb : Rigidbody = transform.GetComponent.<Rigidbody>();
rb.velocity.y = 10 ;
rb.velocity.x = (transform.position.x - GameObject.Find("Player").transform.position.x) * 10 ;
}
}
}
}}
function OnGUI()
{
var posicaoGUI : Rect ;
posicaoGUI = Rect (5, 5, 200, 100) ;
GUI.Label (posicaoGUI ,"Pontos: " + pontos) ;
}
\ No newline at end of file
#pragma strict
#pragma strict
// vermelho polar
// preto apolar
......@@ -10,52 +10,36 @@ var clock : float = 0;
static var destroi : boolean;
pontos = 0 ;
function Start () {
destroi = false;
}
function Update(){
clock+=Time.deltaTime;
if (pontos == 10)
{
var option: int = (EditorUtility.DisplayDialogComplex("Você Venceu!", "Gostaria de jogar novamente?", "Sim", "Cancel", "Voltar ao menu")) ;
switch (option){
case 0:
Application.LoadLevel("1") ;
break ;
case 2:
//Application.LoadLevel("menu") ;
break ;
}
}
}
function OnCollisionEnter (col: Collision)
{if(clock >=0.1){
// cor = GetComponent.<Renderer>().material.GetColor(col.gameObject.name);
// Debug.Log(cor);
Debug.Log(pontos);
if (col.gameObject.name == "Player")
{
{
// Destroy(col.gameObject);
if (SegueMouse.polar && CaiObjeto.molPolar)
{
pontos++ ;
pontos=pontos+1 ;
clock= 0;
destroi = true;
}
else {
if (!SegueMouse.polar && CaiObjeto.molApolar)
{
pontos++ ;
pontos=pontos+1 ;
clock = 0;
destroi = true;
}
else
{
print(transform.gameObject.GetComponent.<Rigidbody>().velocity.y);
var rb : Rigidbody = transform.GetComponent.<Rigidbody>();
rb.velocity.y = 10 ;
rb.velocity.x = (transform.position.x - GameObject.Find("Player").transform.position.x) * 10 ;
......@@ -66,9 +50,3 @@ function OnCollisionEnter (col: Collision)
}
}}
function OnGUI()
{
var posicaoGUI : Rect ;
posicaoGUI = Rect (5, 5, 200, 100) ;
GUI.Label (posicaoGUI ,"Pontos: " + pontos) ;
}
\ No newline at end of file
......@@ -10,8 +10,6 @@ var cont: int;
static var polar: boolean ;
function Start () {
EditorUtility.DisplayDialog("Como jogar:", "Movimente o mouse para controlar o fosfolipídio (seu botão esquerdo alterna entre a parte polar e apolar)", "Ok", "Cancel") ;
EditorUtility.DisplayDialog("Como jogar:", "A parte polar interage com as gotas d'água. A parte apolar interage com o óleo. Interaja 10 vezes para vencer", "Ok", "Cancel") ;
polar = true ;
cont = 0;
aux = -2;
......@@ -33,16 +31,5 @@ function Update () {
else
polar = true ;
}
if(Input.GetKey(KeyCode.Escape)){
var option: int = EditorUtility.DisplayDialogComplex("Esc", "O que você deseja fazer?", "Reiniciar", "Cancel", "Menu Principal") ;
switch(option){
case 0:
Application.LoadLevel("1") ;
break ;
case 2:
//Application.LoadLevel("menu") ;
break ;
}
}
}
\ No newline at end of file
#pragma strict
var objeto: GameObject[];
var a: float;
var rb: Rigidbody;
static var molApolar: boolean ;
static var molPolar:boolean ;
function Start () {
EditorUtility.DisplayDialog("Como jogar:", "Movimente o mouse para controlar o fosfolipídio (seu botão esquerdo alterna entre a parte polar e apolar)", "Ok", "Cancel") ;
EditorUtility.DisplayDialog("Como jogar:", "A parte polar interage com as gotas d'água. A parte apolar interage com o óleo. Interaja 10 vezes para vencer", "Ok", "Cancel") ;
rb = GetComponent.<Rigidbody>();
rb.velocity = Vector3(0, -2, 0);
a = Random.value;
if (a < 0.5)
{
molApolar = true ;
molPolar = false ;
}
else
{
molPolar = true ;
molApolar = false ;
}
transform.position.x = Random.Range(-9,9);
}
function polaridade ()
{
if (a < 0.5)
{
molApolar = true ;
molPolar = false ;
}
else
{
molPolar = true ;
molApolar = false ;
}
}
function Update () {
EditorUtility.DisplayDialog("Como jogar:", "Movimente o mouse para controlar o fosfolipídio (seu botão esquerdo alterna entre a parte polar e apolar)", "Ok", "Cancel") ;
EditorUtility.DisplayDialog("Como jogar:", "A parte polar interage com as gotas d'água. A parte apolar interage com o óleo. Interaja 10 vezes para vencer", "Ok", "Cancel") ;
if ((transform.position.y < -4 )|| (ColisaoGota.destroi))
{
rb.velocity = Vector3(0, -2, 0);
a = Random.value;
polaridade ();
transform.position.y = 4;
transform.position.x = Random.Range(-9,9);
transform.position.z = 0;
ColisaoGota.destroi = false;
}
}
#pragma strict
var prefabPolar : GameObject;
var prefabApolar : GameObject;
var instanciado : GameObject;
static var objetoEmCena : GameObject;
function Start ()
{
atualiza();
criaObj();
if (instanciado == prefabApolar)
{
CaiObjeto.molApolar = true;
CaiObjeto.molPolar = false;
}
else
{
CaiObjeto.molApolar = false;
CaiObjeto.molPolar = true;
}
}
function atualiza()
{
if(Random.value>0.5)
instanciado = prefabPolar;
else
instanciado = prefabApolar;
if (instanciado == prefabApolar)
{
CaiObjeto.molApolar = true;
CaiObjeto.molPolar = false;
}
else
{
CaiObjeto.molApolar = false;
CaiObjeto.molPolar = true;
}
}
function criaObj ()
{
if (objetoEmCena!=null)
{
Destroy(objetoEmCena);
}
atualiza();
objetoEmCena = Instantiate(instanciado,transform.position+Vector3(0, -2, 0),transform.rotation);
objetoEmCena.transform.position.y = 4;
objetoEmCena.transform.position.x = Random.Range(-9,9);
objetoEmCena.transform.position.z = 0;
ColisaoPolar.destroi = false;
}
function Update () {
if ((objetoEmCena.transform.position.y < -4 )|| (ColisaoPolar.destroi))
{
criaObj();
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 15adfbee3d9034e6286d7577ade926ae
timeCreated: 1467985152
guid: ebe4c219b1f58411f9a58b4920aa7857
timeCreated: 1476711513
licenseType: Free
MonoImporter:
serializedVersion: 2
......
#pragma strict
var objeto: GameObject;
var aux=0;
function Update ()
{
transform.position.y = -3 ;
if(Input.GetMouseButtonDown(0))
{
if (aux)
{
transform.position.z = 4.823 ;
aux=0;
}
else
{
transform.position.z = 3.3079 ;
aux=1;
}
}