-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMGameClientView.cs
More file actions
76 lines (66 loc) · 2.41 KB
/
Copy pathMGameClientView.cs
File metadata and controls
76 lines (66 loc) · 2.41 KB
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
/*
*┌──────────────────────────────────┐
*│ Copyright(C) 2016 by Antiphon.All rights reserved. │
*│ Author:by Locke Xie 2016-12-25 │
*└──────────────────────────────────┘
*
* 功 能: 加装和绑定视图中的obj
* 类 名: MGameClienView.cs
*
* 修改历史:
*
*
*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MGameClientView
{
//麻将位置管理根
public GameObject MahjongGroup;
//主角区域
public MahjongGrooves Host;
//对家区域
public MahjongGrooves Front;
//右家区域
public MahjongGrooves Right;
//左家区域
public MahjongGrooves Left;
public Transform[] PathA = new Transform[10]; //色子A运动轨迹
public Transform[] PathB = new Transform[10]; //色子B运动轨迹
#region 交互UI
#endregion
public MGameClientView()
{
MahjongGroup = GameObject.FindWithTag("MahjongGrooves");
Host = new MahjongGrooves(MahjongGroup.transform.Find("Host"));
Front = new MahjongGrooves(MahjongGroup.transform.Find("Front"));
Right = new MahjongGrooves(MahjongGroup.transform.Find("Right"));
Left = new MahjongGrooves(MahjongGroup.transform.Find("Left"));
for(int i = 0; i < 10; ++i)
{
PathA[i] = MahjongGroup.transform.Find("PathA").GetChild(i);
PathB[i] = MahjongGroup.transform.Find("PathB").GetChild(i);
}
}
}
public struct MahjongGrooves
{
public Transform handleCard; //刚摸到的牌的位置
public Transform handCard; //手牌
public Transform mingGangPoint; //明杠位置
public Transform anGangPoint; //暗杠位置
public Transform outCardPoint; //出牌位置
public Transform spacialCard; //特殊牌摆放位置
public Transform group; //牌库
public MahjongGrooves(Transform tran)
{
handCard = tran.Find("HandCard");
handleCard = tran.Find("HandleCard");
mingGangPoint = tran.Find("MingGangPoint");
anGangPoint = tran.Find("AnGangPoint");
outCardPoint = tran.Find("OutCardPoint");
spacialCard = tran.Find("SpacialCard");
group = tran.Find("Group");
}
}