Commit c1cd6645 authored by Talita Halboth's avatar Talita Halboth

update de coisa

parent 84cfcea0
This diff is collapsed.
...@@ -8,131 +8,120 @@ Material: ...@@ -8,131 +8,120 @@ Material:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_Name: Oil m_Name: Oil
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: m_ShaderKeywords: _EMISSION
m_LightmapFlags: 5 m_LightmapFlags: 1
m_CustomRenderQueue: -1 m_CustomRenderQueue: -1
stringTagMap: {} stringTagMap: {}
m_SavedProperties: m_SavedProperties:
serializedVersion: 2 serializedVersion: 2
m_TexEnvs: m_TexEnvs:
data: - first:
first: name: _BumpMap
name: _MainTex second:
second: m_Texture: {fileID: 0}
m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1}
m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0}
m_Offset: {x: 0, y: 0} - first:
data: name: _DetailAlbedoMap
first: second:
name: _BumpMap m_Texture: {fileID: 0}
second: m_Scale: {x: 1, y: 1}
m_Texture: {fileID: 0} m_Offset: {x: 0, y: 0}
m_Scale: {x: 1, y: 1} - first:
m_Offset: {x: 0, y: 0} name: _DetailMask
data: second:
first: m_Texture: {fileID: 0}
name: _DetailNormalMap m_Scale: {x: 1, y: 1}
second: m_Offset: {x: 0, y: 0}
m_Texture: {fileID: 0} - first:
m_Scale: {x: 1, y: 1} name: _DetailNormalMap
m_Offset: {x: 0, y: 0} second:
data: m_Texture: {fileID: 0}
first: m_Scale: {x: 1, y: 1}
name: _MetallicGlossMap m_Offset: {x: 0, y: 0}
second: - first:
m_Texture: {fileID: 0} name: _EmissionMap
m_Scale: {x: 1, y: 1} second:
m_Offset: {x: 0, y: 0} m_Texture: {fileID: 0}
data: m_Scale: {x: 1, y: 1}
first: m_Offset: {x: 0, y: 0}
name: _ParallaxMap - first:
second: name: _MainTex
m_Texture: {fileID: 0} second:
m_Scale: {x: 1, y: 1} m_Texture: {fileID: 0}
m_Offset: {x: 0, y: 0} m_Scale: {x: 1, y: 1}
data: m_Offset: {x: 0, y: 0}
first: - first:
name: _OcclusionMap name: _MetallicGlossMap
second: second:
m_Texture: {fileID: 0} m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
data: - first:
first: name: _OcclusionMap
name: _EmissionMap second:
second: m_Texture: {fileID: 0}
m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1}
m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0}
m_Offset: {x: 0, y: 0} - first:
data: name: _ParallaxMap
first: second:
name: _DetailMask m_Texture: {fileID: 0}
second: m_Scale: {x: 1, y: 1}
m_Texture: {fileID: 0} m_Offset: {x: 0, y: 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}
m_Floats: m_Floats:
data: - first:
first: name: _BumpScale
name: _SrcBlend second: 1
second: 1 - first:
data: name: _Cutoff
first: second: 0.5
name: _DstBlend - first:
second: 0 name: _DetailNormalMapScale
data: second: 1
first: - first:
name: _Cutoff name: _DstBlend
second: 0.5 second: 0
data: - first:
first: name: _GlossMapScale
name: _ZWrite second: 1
second: 1 - first:
data: name: _Glossiness
first: second: 0.5
name: _Glossiness - first:
second: 0.5 name: _GlossyReflections
data: second: 1
first: - first:
name: _Metallic name: _Metallic
second: 0 second: 0
data: - first:
first: name: _Mode
name: _BumpScale second: 0
second: 1 - first:
data: name: _OcclusionStrength
first: second: 1
name: _Parallax - first:
second: 0.02 name: _Parallax
data: second: 0.02
first: - first:
name: _OcclusionStrength name: _SmoothnessTextureChannel
second: 1 second: 0
data: - first:
first: name: _SpecularHighlights
name: _DetailNormalMapScale second: 1
second: 1 - first:
data: name: _SrcBlend
first: second: 1
name: _UVSec - first:
second: 0 name: _UVSec
data: second: 0
first: - first:
name: _Mode name: _ZWrite
second: 0 second: 1
m_Colors: m_Colors:
data: - first:
first: name: _Color
name: _EmissionColor second: {r: 0, g: 0.543205, b: 0.7647059, a: 0.472}
second: {r: 0, g: 0, b: 0, a: 1} - first:
data: name: _EmissionColor
first: second: {r: 0, g: 0, b: 0, a: 1}
name: _Color
second: {r: 0.20112458, g: 0.21342319, b: 0.45588237, 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 objeto: GameObject;
var a: float; var a: float;
var rb: Rigidbody; static var rb: Rigidbody;
static var molApolar: boolean ; static var molApolar: boolean ;
static var molPolar:boolean ; static var molPolar:boolean ;
var water : Material; var water : Material;
...@@ -11,8 +11,8 @@ var oil : Material; ...@@ -11,8 +11,8 @@ var oil : Material;
// no prototipo a cor vermelha representa polar e a preta apolar // no prototipo a cor vermelha representa polar e a preta apolar
function Start () { function Start () {
rb = GetComponent.<Rigidbody>(); rb = GetComponent.<Rigidbody>();
rb.velocity = Vector3(0, -2, 0); // rb.velocity = Vector3(0, -2, 0);
a = Random.value; /*a = Random.value;
if (a < 0.5) if (a < 0.5)
{ {
GetComponent.<Renderer>().material.CopyPropertiesFromMaterial(water); GetComponent.<Renderer>().material.CopyPropertiesFromMaterial(water);
...@@ -24,37 +24,21 @@ function Start () { ...@@ -24,37 +24,21 @@ function Start () {
GetComponent.<Renderer>().material.CopyPropertiesFromMaterial(oil); GetComponent.<Renderer>().material.CopyPropertiesFromMaterial(oil);
molPolar = true ; molPolar = true ;
molApolar = false ; 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 () { function Update () {
if ((transform.position.y < -4 )|| (ColisaoPolar.destroi)) if ((transform.position.y < -4 )|| (ColisaoPolar.destroi))
{ {
rb.velocity = Vector3(0, -2, 0); // rb.velocity = Vector3(0, -2, 0);
a = Random.value; a = Random.value;
polaridade (); //polaridade ();
// transform.GetComponent.<Renderer>().material.color = RandomColor(); // transform.GetComponent.<Renderer>().material.color = RandomColor();
transform.position.y = 4; // transform.position.y = 4;
transform.position.x = Random.Range(-9,9); // transform.position.x = Random.Range(-9,9);
transform.position.z = 0; //transform.position.z = 0;
ColisaoPolar.destroi = false; 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 // vermelho polar
// preto apolar // preto apolar
...@@ -10,52 +10,36 @@ var clock : float = 0; ...@@ -10,52 +10,36 @@ var clock : float = 0;
static var destroi : boolean; static var destroi : boolean;
pontos = 0 ; pontos = 0 ;
function Start () { function Start () {
destroi = false; destroi = false;
} }
function Update(){ function Update(){
clock+=Time.deltaTime; 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) function OnCollisionEnter (col: Collision)
{if(clock >=0.1){ {if(clock >=0.1){
// cor = GetComponent.<Renderer>().material.GetColor(col.gameObject.name); // cor = GetComponent.<Renderer>().material.GetColor(col.gameObject.name);
// Debug.Log(cor);
Debug.Log(pontos); Debug.Log(pontos);
if (col.gameObject.name == "Player") if (col.gameObject.name == "Player")
{ {
// Destroy(col.gameObject); // Destroy(col.gameObject);
if (SegueMouse.polar && CaiObjeto.molPolar) if (SegueMouse.polar && CaiObjeto.molPolar)
{ {
pontos++ ; pontos=pontos+1 ;
clock= 0; clock= 0;
destroi = true; destroi = true;
} }
else { else {
if (!SegueMouse.polar && CaiObjeto.molApolar) if (!SegueMouse.polar && CaiObjeto.molApolar)
{ {
pontos++ ; pontos=pontos+1 ;
clock = 0; clock = 0;
destroi = true; destroi = true;
} }
else else
{ {
print(transform.gameObject.GetComponent.<Rigidbody>().velocity.y);
var rb : Rigidbody = transform.GetComponent.<Rigidbody>(); var rb : Rigidbody = transform.GetComponent.<Rigidbody>();
rb.velocity.y = 10 ; rb.velocity.y = 10 ;
rb.velocity.x = (transform.position.x - GameObject.Find("Player").transform.position.x) * 10 ; rb.velocity.x = (transform.position.x - GameObject.Find("Player").transform.position.x) * 10 ;
...@@ -66,9 +50,3 @@ function OnCollisionEnter (col: Collision) ...@@ -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; ...@@ -10,8 +10,6 @@ var cont: int;
static var polar: boolean ; static var polar: boolean ;
function Start () { 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 ; polar = true ;
cont = 0; cont = 0;
aux = -2; aux = -2;
...@@ -33,16 +31,5 @@ function Update () { ...@@ -33,16 +31,5 @@ function Update () {
else else
polar = true ; 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;
}