void PlayerPickupController_OnPickUp(TwitchPlayerController playerController, GameObject otherGameObject) { if (m_Viewers.ContainsKey(playerController.nick)) { m_Viewers[playerController.nick].chattersUI.pointsText.text = string.Format("{0:00}", playerController.points); } }
/// <summary> /// Gives derived classes an oppotunity to modify the GameObject /// </summary> /// <param name="playerController">Player controller created</param> /// <param name="playerGameObject">Player associated GameObject created</param> protected override void PlayerPrefabInstantiated(TwitchPlayerController playerController, GameObject playerGameObject) { base.PlayerPrefabInstantiated(playerController, playerGameObject); IPlayerUI playerUI = playerGameObject.GetComponent <IPlayerUI>(); if (playerUI != null) { playerGameObject.GetComponent <IPlayerUI>().playerController = playerController; playerGameObject.name = string.Concat(playerGameObject.name, ".", playerController.nick); } }
void PlayerPickupController_OnPickUp(TwitchPlayerController playerController, GameObject obj) { m_CurrentCount--; Destroy(obj); }
void Awake() { m_PlayerController = GetComponent <TwitchPlayerController>(); }
private void SavePlayerLocation(TwitchPlayerController player) { playerLocation = player.gameObject.transform.position; playerRotation = player.gameObject.transform.rotation; targetDoor = player.TargetDoor; }
public void SwitchToBattle(TwitchPlayerController player) { SavePlayerLocation(player); }