public Registration(CharacterSelector selector, RegisteredPlayerUIView ui, RegistrationState registrationState, NetworkMode networkMode, PlayerRegistration context)
 {
     this.selector          = selector;
     this.ui                = ui;
     this.registrationState = registrationState;
     this.context           = context;
     this.localID           = -1;
     this.networkMode       = networkMode;
     this.echoPosition      = Vector2.zero;
 }
    void setPlayerReady(int playerID)
    {
        Registration data = registeredPlayers[playerID];

        data.ready = true;
        CharacterHolder characterHolder = data.context.charactersData[data.SelectedCharacterID];

        characterHolder.Select();

        RegisteredPlayerUIView ui = SimplePool.Spawn(playerRegistrationUIPrefab).GetComponent <RegisteredPlayerUIView>();

        Transform UIParent;

        switch (characterHolder.character.side)
        {
        default:
        case Side.LEFT:     //witch
            UIParent = UIParentWitch;
            break;

        case Side.RIGHT:
            UIParent = UIParentAlien;
            break;
        }
        if (data.localID != -1)
        {
            ui.playerColor = possiblePlayers[data.localID].color;
        }
        else
        {
            ui.playerColor = data.color;
        }
        ui.transform.SetParent(UIParent, Vector3.one, false);
        ui.registration = data;
        data.ui         = ui;

        if (data.localID != -1)
        {
            ui.playerName = possiblePlayers[data.localID].name;
        }

        Vector2 echoPosition = data.selector.transform.position;

        Destroy(data.selector.gameObject);
        data.selector = null;

        spawnPlaygroundAvatar(playerID);

        ui.UpdateCharacterSprite(data.SelectedCharacterID);

        data.echoPosition = echoPosition;

        checkReady();
    }
 public Registration(CharacterSelector selector, RegisteredPlayerUIView ui, RegistrationState registrationState, int localID, NetworkMode networkMode, PlayerRegistration context)
     : this(selector, ui, registrationState, networkMode, context)
 {
     this.localID = localID;
 }
 public Registration(CharacterSelector selector, RegisteredPlayerUIView ui, RegistrationState registrationState, NetworkMode networkMode, PlayerRegistration context)
 {
     this.selector = selector;
     this.ui = ui;
     this.registrationState = registrationState;
     this.context = context;
     this.localID = -1;
     this.networkMode = networkMode;
     this.echoPosition = Vector2.zero;
 }
 public Registration(CharacterSelector selector, RegisteredPlayerUIView ui, RegistrationState registrationState, PlayerRegistrationVisuals visuals)
 {
     this.selector = selector;
     this.ui = ui;
     this.registrationState = registrationState;
     this.visuals = visuals;
 }
 public Registration(CharacterSelector selector, RegisteredPlayerUIView ui, RegistrationState registrationState, int localID, NetworkMode networkMode, PlayerRegistration context)
     : this(selector, ui, registrationState, networkMode, context)
 {
     this.localID = localID;
 }