/// <summary> /// ///////////////////////////// SHARED GAME MODE FUNCTIONS //////////////////////////////// /// </summary> public void PlayerConstructor(/*string givenName,*/ Sprite givenPicture, GameObject memefab, GameObject votefab, ModeratorScript[] mods, ChatManagerScript cm) { DontDestroyOnLoad(this); m_soundPlayer = GetComponent <HFTSoundPlayer>(); banDuration = 5; amIBanned = false; playerProfilePicture = givenPicture; playerScore = 0; memeMessagePrefab = memefab; voteMessagePrefab = votefab; managerScriptReference = cm; chatModerators = mods; myHFTInput = GetComponent <HFTInput>(); playerColor = GetComponent <HFTGamepad>().color; //playerName = givenName; //gameObject.name = givenName; }
void Start() { //Debug.Log ("player start"); DontDestroyOnLoad(this.gameObject); m_hftInput = GetComponent <HFTInput>(); m_soundPlayer = GetComponent <HFTSoundPlayer>(); playerDir = Vector2.right; manager = GameObject.Find("Manager").GetComponent <Manager> (); manager.addPlayer(this.gameObject); GameObject.Find("CharacterCreator").GetComponent <CharacterCreator>().createCharacter(body, head, GetComponent <HFTGamepad>().color); if (Application.loadedLevel == 0) { GameObject.Find("StagingAreaManager").GetComponent <StagingAreaManager> ().addPlayer(this.gameObject); } transform.localScale = new Vector2(0.5f, 0.5f); }
void Awake() { m_soundPlayer = GetComponent<HFTSoundPlayer>(); }