/
Resolving.cs
44 lines (37 loc) · 1.15 KB
/
Resolving.cs
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
33
34
35
36
37
38
39
40
41
42
43
44
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Resolving : MonoBehaviour
{
public GameObject resolving;
public GameObject bubble;
public GameObject angry;
public GameObject angry2;
public GameObject popup2;
public GameObject mask;
//public Sprite loveheart;
public float num = 0;
void OnMouseOver()
{
angry.GetComponentInParent<Animator>().enabled = true;
resolving.GetComponent<Animator>().Play("ResolvingBigger");
}
void OnMouseExit()
{
angry.GetComponentInParent<Animator>().enabled = true;
resolving.GetComponent<Animator>().Play("ResolvingSmaller");
}
void OnMouseDown()
{
angry.GetComponentInParent<Animator>().enabled = false;
//angry.GetComponent<SpriteRenderer>().sprite = loveheart;
//angry2.GetComponent<SpriteRenderer>().sprite = loveheart;
bubble.SetActive(false);
num += 1;
if (num == 1)
{
popup2.SetActive(true);
mask.transform.localScale = new Vector3(80f, 80f, 80f);
}
}
}