Skip to content
Snippets Groups Projects
Commit 7c84e25f authored by ojsj18's avatar ojsj18 :speech_balloon:
Browse files

vibrações adicionadas

parent 05e3626d
Branches
No related tags found
No related merge requests found
Showing
with 8 additions and 13 deletions
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//script porco feito pelo Ovidio
public class anim : MonoBehaviour {
private Animator bombex;
void Start ()
......@@ -9,10 +9,11 @@ public class anim : MonoBehaviour {
bombex = GetComponent<Animator> ();
}
void OnCollisionEnter2D (Collision2D Collider) {
if (Collider.gameObject.tag == "capanga") {
bombex.SetBool ("tocar", true);
Destroy(gameObject, 1);
void OnCollisionEnter2D (Collision2D Collider) { //void para uso de colliders
if (Collider.gameObject.tag == "capanga") { //acessa os colliders atraves das tags dadas
bombex.SetBool ("tocar", true); //acessa a variavel da animação e muda o estado da condição
Destroy(gameObject, 1); //destroi o objeto
Handheld.Vibrate (); //testevibração
}
}
}
......@@ -11,7 +11,6 @@ public class ondas : MonoBehaviour {
cont2 = 0;
}
// Update is called once per frame
void Update () {
Vector3 pos = transform.position;
if (cont1 < lim)
......
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Scripts/MoveBarco/onda.cs">
<Files>
<File FileName="Assets/Scripts/MoveBarco/onda.cs" Line="5" Column="1" />
<File FileName="Assets/Scripts/MaskLevel/ButtonHandler.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workbench />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment