Пример #1
0
	public void GenerateRandomCostume(CharactorCos model) {
		model.HeadIndex = Random.Range (0, Head.Length);
		model.EyeIndex = Random.Range (0, Eye.Length);
		model.BodyIndex = Random.Range (0, Body.Length);
		model.UarmIndex = Random.Range (0, Uarm.Length);
		model.BarmIndex = Random.Range (0, Barm.Length);
		model.LegIndex = Random.Range (0, Leg.Length);
		model.WeponIndex = Random.Range (0, Wepon.Length);
	}
Пример #2
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);
    }
Пример #3
0
	public void SetCharaCos(CharactorCos model) {
		SetCharaCos (model.HeadIndex, model.EyeIndex, model.BodyIndex, model.UarmIndex,model.BarmIndex, model.LegIndex, model.WeponIndex);
	}