-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTheDictionaryScript.cs
59 lines (55 loc) · 1.33 KB
/
TheDictionaryScript.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
using Random = UnityEngine.Random;
using UnityEngine.UI;
using DG.Tweening;
public class TheDictionaryScript : MonoBehaviour
{
public Transform dictionaryDeck;
public Image imgDictionary;
public Sprite newHPSprite;
public Sprite newSPSprite;
public Sprite newIPSprite;
public Sprite newFPSprite;
public Sprite newLPSprite;
public void PauseDicGame()
{
if (Time.timeScale == 1)
{
dictionaryDeck.DOLocalMove(new Vector3(0, 0, 0), 0.3f).OnComplete(() =>
{
Time.timeScale = 0;
});
}
}
public void ResumeDicGame()
{
if (Time.timeScale == 0)
{
Time.timeScale = 1;
dictionaryDeck.DOLocalMove(new Vector3(1440, 0, 0), 0.3f);
}
}
public void HPChangeSprite()
{
imgDictionary.sprite = newHPSprite;
}
public void IPChangeSprite()
{
imgDictionary.sprite = newSPSprite;
}
public void LPChangeSprite()
{
imgDictionary.sprite = newIPSprite;
}
public void FPChangeSprite()
{
imgDictionary.sprite = newFPSprite;
}
public void SPChangeSprite()
{
imgDictionary.sprite = newLPSprite;
}
}