コード例 #1
0
//	void DisplayBaseHammer() {
//		if(specificCurrentUser != null) {
//			specificCurrentUser.SpecificHammerToUse.SetActive(false);
//		}
//		baseHammerToUse.SetActive(true);
//	}

//	void RemoveSpecificUser() {
//		DisplayBaseHammer();
//		specificCurrentUser = null;
//	}

    HammerUser ChooseUser()
    {
        List <HammerUser> listForProbability = MakeProbabilityList();
        HammerUser        userChosen         = null;

        if (listForProbability.Count > 0)
        {
            userChosen = listForProbability[Random.Range(0, listForProbability.Count)];
        }
        return(userChosen);
    }
コード例 #2
0
    // Use this for initialization
//	void Start () {
//	}

    // Update is called once per frame
//	void Update () {
//
//	}

    public void InitUserBubble(HammerUser user)
    {
        GetComponent <RectTransform>().localScale = Vector3.zero;
        SpeechElement speech = user.speechList.ChooseSpeech();

        if (speech != null)
        {
            speechBubble.speechText.text = speech.text;
//			speechBubble.profilePicture.sprite = user.profilePicture;
            audioGroupNameToPlay = speech.audioGroupName;
            animationSeq.Restart();
            if (speech.wallTexture != null && gm != null)
            {
                gm.ChangeTexture(speech.wallTexture);
            }
        }
    }
コード例 #3
0
 void AssignSpecificUser()
 {
     specificCurrentUser = ChooseUser();
 }