Пример #1
0
	public void OnCreateNewUser(string mName,GameObject newUser,UserType type,int door){
		newUser.transform.position = entrances [door].transform.position;
		FestivalUser userInfo = new FestivalUser ();
		userInfo.userType = type;
		userInfo.ID = users.Count;
		userInfo.name = mName;
		userInfo.animInfo = usersData.Find (ud => ud.userType == type);
		newUser.GetComponent<FestivalUserBehaviour> ().Init (entrances [door], userInfo);
	}
Пример #2
0
    public void OnCreateNewUser(string mName, GameObject newUser, UserType type, int door)
    {
        newUser.transform.position = entrances [door].transform.position;
        FestivalUser userInfo = new FestivalUser();

        userInfo.userType = type;
        userInfo.ID       = users.Count;
        userInfo.name     = mName;
        userInfo.animInfo = usersData.Find(ud => ud.userType == type);
        newUser.GetComponent <FestivalUserBehaviour> ().Init(entrances [door], userInfo);
    }
	// Use this for initialization
	public void Init (EntranceInfo mEntrance,FestivalUser data) {
		currentPoint = 0;
		entrance = mEntrance;
		mState = FestivalUserState.FollowingDirection;
		currentDirection = mEntrance.entranceDirection;
		transform.up = currentDirection;
		_Data = data;
		followPoints = new List<Vector2> ();

		InitLine ();
		StartCoroutine ("FollowBehaviour");

		mSkeletonAnimation.state.SetAnimation (0,_Data.animInfo.walk_anim, true);
		nameLabel = (Instantiate (nameLabel_prefab) as GameObject).GetComponent<UILabel> ();
		nameLabel.GetComponent<FollowPlayer> ().target = transform;
		nameLabel.text = _Data.name;

		controlState = UserControlState.Continue;
	}
Пример #4
0
    // Use this for initialization
    public void Init(EntranceInfo mEntrance, FestivalUser data)
    {
        currentPoint     = 0;
        entrance         = mEntrance;
        mState           = FestivalUserState.FollowingDirection;
        currentDirection = mEntrance.entranceDirection;
        transform.up     = currentDirection;
        _Data            = data;
        followPoints     = new List <Vector2> ();

        InitLine();
        StartCoroutine("FollowBehaviour");

        mSkeletonAnimation.state.SetAnimation(0, _Data.animInfo.walk_anim, true);
        nameLabel = (Instantiate(nameLabel_prefab) as GameObject).GetComponent <UILabel> ();
        nameLabel.GetComponent <FollowPlayer> ().target = transform;
        nameLabel.text = _Data.name;

        controlState = UserControlState.Continue;
    }