-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTraitControl.cs
80 lines (79 loc) · 2.66 KB
/
TraitControl.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
using System.Collections.Generic;
using UnityEngine;
using Random = UnityEngine.Random;
using UnityEngine.UI;
using DG.Tweening;
public class TraitControl : MonoBehaviour
{
public TraitObjects traitObject;
public void Init(TraitObjects traitObject)
{
this.traitObject = traitObject;
}
public void SelectedTrait()
{
if (traitObject == TraitObjects.gaojilianjin)
{
GameManager.instance.smallPotionPrice += 2;
GameManager.instance.bigPotionPrice += 2;
GameManager.instance.questNeeded += 2;
}
else if (traitObject == TraitObjects.zhongcaipiao)
{
GameManager.instance.moneyCount += 50;
}
else if (traitObject == TraitObjects.gaobiaozhun)
{
QuestManager.instance.maxTime -= 2;
GameManager.instance.smallPotionPrice += 5;
GameManager.instance.bigPotionPrice += 5;
}
else if (traitObject == TraitObjects.guanggao)
{
QuestManager.instance.maxTime += 1;
GameManager.instance.questNeeded += 1;
}
else if (traitObject == TraitObjects.maiyisongyi)
{
GameManager.instance.maiyisongyiPermit = true;
}
else if (traitObject == TraitObjects.fanghuoyaojipermit)
{
GameManager.instance.fanghuoyaojiPermit = true;
QuestManager.instance.maxTime += 5;
}
else if (traitObject == TraitObjects.shuimianyaojipermit)
{
GameManager.instance.shuimianyaojiPermit = true;
QuestManager.instance.maxTime += 5;
}
else if (traitObject == TraitObjects.yinxingyaojipermit)
{
GameManager.instance.yinxingyaojiPermit = true;
QuestManager.instance.maxTime += 5;
}
else if (traitObject == TraitObjects.xingyunyaojipermit)
{
GameManager.instance.xingyunyaojiPermit = true;
QuestManager.instance.maxTime += 5;
}
else if (traitObject == TraitObjects.piliangjinhuo)
{
GameManager.instance.refreshIncrement -= 2;
GameManager.instance.smallPotionPrice -= 5;
GameManager.instance.bigPotionPrice -= 5;
}
else if (traitObject == TraitObjects.xiaofei)
{
GameManager.instance.questNeeded -= 1;
GameManager.instance.smallPotionPrice += 2;
GameManager.instance.bigPotionPrice += 2;
}
else if (traitObject == TraitObjects.shunengshengqiao)
{
GameManager.instance.theMaterialCount -= 1;
}
GameManager.instance.OnTraitSelection();
}
}