-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathYma_code.cs
More file actions
32 lines (32 loc) · 936 Bytes
/
Yma_code.cs
File metadata and controls
32 lines (32 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Yma_code : MonoBehaviour
{
private Animation anim;
//private Animator robot11, robot12;
public Text label;
//public GameObject robot1,robot2;
// Use this for initialization
void Start()
{
label.gameObject.SetActive(false);
anim = this.GetComponent<Animation>();
//robot11 = robot1.GetComponent<Animator>();
//robot12 = robot2.GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
}
void OnTriggerEnter(Collider col)
{
label.gameObject.SetActive(true);
//label.PlayForward();
anim.Play("WalkBack_Shoot");
col.gameObject.GetComponent<Animation>().Play("Die");
//robot11.Play("yma_robot1");
//robot12.Play("yma_robot2");
}
}