Exemple #1
0
    // Use this for initialization
    void Start () {
        //SetCharaCos(1, 1, 1, 1, 1, 1, 1);
		CharactorCos characterCos = new CharactorCos();
		characterCos.HeadIndex = Random.Range (0, Head.Length);
		characterCos.EyeIndex = Random.Range (0, Eye.Length);
		characterCos.BodyIndex = Random.Range(0, Body.Length);
		characterCos.UarmIndex = Random.Range (0, Uarm.Length);
		characterCos.BarmIndex = Random.Range (0, Barm.Length);
		characterCos.LegIndex = Random.Range (0, Leg.Length);
		characterCos.WeponIndex = Random.Range (0, Wepon.Length);
		SetCharaCos (characterCos);
		PhotonRPCModel model = new PhotonRPCModel ();
		model.senderId = GameManager.GetInstance ().myInfo.id.ToString();
		model.command = PhotonRPCCommand.Costume;
		CostumeCommand command = new CostumeCommand ();
		command.target = model.senderId;
		command.characotorCostume = characterCos;
		model.message = JsonUtility.ToJson(command);
		PhotonRPCHandler.GetInstance().PostRPC(model);
    }
Exemple #2
0
	void Awake() {
		costumeCommand = new CostumeCommand ();
		playerID = GameManager.GetInstance ().myInfo.id.ToString ();
	}