-
Notifications
You must be signed in to change notification settings - Fork 0
/
PrefabName.cs
64 lines (61 loc) · 1.9 KB
/
PrefabName.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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
public class PrefabName : MonoBehaviourPunCallbacks
{
public int index = 0;
// Start is called before the first frame update
//自分と相手の名前を分けるためのスクリプト
void Start()
{
if(photonView.IsMine)
{
switch (index)
{
case 0://avater
this.name = "Player1";
break;
case 1://head
this.name = "HeadTarget1";
break;
case 2://LeftHand
this.name = "LeftHandTarget1";
break;
case 3://RightHand
this.name = "RightHandTarget1";
break;
case 4://LeftFoot
this.name = "LeftFootTarget1";
break;
case 5://RightFoot
this.name = "RightFootTarget1";
break;
}
}
else
{
switch (index)
{
case 0://avater
this.name = "Player2";
break;
case 1://head
this.name = "HeadTarget2";
break;
case 2://LeftHand
this.name = "LeftHandTarget2";
break;
case 3://RightHand
this.name = "RightHandTarget2";
break;
case 4://LeftFoot
this.name = "LeftFootTarget2";
break;
case 5://RightFoot
this.name = "RightFootTarget2";
break;
}
}
}
}