public void InstantiateFPSEntity(GameObject fpsEntityPrefab) { //instantiate an entity, duh if (fpsEntity != null) { return; } GameObject newEntity = (GameObject)GameObject.Instantiate(fpsEntityPrefab); fpsEntity = newEntity.GetComponent <FPSEntity>(); fpsEntity.colA = colA; fpsEntity.colB = colB; fpsEntity.colC = colC; fpsEntity.headType = headType; //fpsEntity.viewID = viewID; fpsEntity.isLocal = local; fpsEntity.thisPlayer = this; if (lives < 0 && local) { currentScore = -99; fpsEntity.spectateMode = true; Debug.Log("Spectate yo"); } }
public void InstantiateFPSEntity(GameObject fpsEntityPrefab) { //instantiate an entity, duh if (fpsEntity != null) return; GameObject newEntity = (GameObject)GameObject.Instantiate(fpsEntityPrefab); fpsEntity = newEntity.GetComponent<FPSEntity>(); fpsEntity.colA = colA; fpsEntity.colB = colB; fpsEntity.colC = colC; fpsEntity.headType = headType; //fpsEntity.viewID = viewID; fpsEntity.isLocal = local; fpsEntity.thisPlayer = this; if (lives<0 && local){ currentScore = -99; fpsEntity.spectateMode = true; Debug.Log("Spectate yo"); } }