private void Update() { if(Input.GetMouseButtonDown(0)) { RaycastHit hit; Ray inputRay = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(inputRay, out hit, Mathf.Infinity)) { CharacterSelector character = hit.collider.GetComponentInParent<CharacterSelector>(); if(character != null) { if(mSelectedCharacter != null) { mSelectedCharacter.Deselect(); } mSelectedCharacter = character; if(mSelectedCharacter != null) { SoundManager.Instance.PlayMenuConfirmSFX(); GlobalData.sSelectedCharacter = mSelectedCharacter.mCharacter; mSelectedCharacter.Select(); UpdateDisplay(); mStartButton.SetActive(true); } } } } }
// Use this for initialization void Start() { selector = FindObjectOfType<CharacterSelector>(); thisRenderer = GetComponent<SpriteRenderer>(); index = 0; }
// Use this for initialization void Start() { _motor = GetComponent<PlatformerMotor2D>(); container = GameObject.Find("Character_Container").GetComponent<CharacterSelector>(); container.rigisterNewCharacter(this); }
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; }
// Start is called before the first frame update void Start() { playerToUnlock = charSelects[Random.Range(0, charSelects.Length)]; cagedSR.sprite = playerToUnlock.playerToSpawn.bodySR.sprite; }