// Update is called once per frame void Update() { score1.text = ScoreHandler.GetInstance().GetScore(1) + ""; score2.text = ScoreHandler.GetInstance().GetScore(2) + ""; score3.text = ScoreHandler.GetInstance().GetScore(3) + ""; score4.text = ScoreHandler.GetInstance().GetScore(4) + ""; }
// Use this for initialization void Awake() { if (instance == null) { instance = this; } }
protected void Awake() { _boxCollider2D = GetComponent <BoxCollider2D>(); _boxCollider2D.enabled = false; _scoreHandler = FindObjectOfType <ScoreHandler>(); StartCoroutine(EnableBoxCollider()); }
// Start is called before the first frame update void Start() { player = FindObjectOfType <PlayerController>(); health = GetComponent <HealthHandler>(); scoreHandler = FindObjectOfType <ScoreHandler>(); AddNoneTriggerBoxCollider(); }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.CompareTag("Ball") && other.GetComponent <BallMovement>().GetGoingUp()) { ScoreHandler.IncreaseScore(); } }
private void Start() { _camera = Camera.main; _scores = FindObjectOfType <ScoreHandler>(); _results = FindObjectOfType <ResultHandler>(); Assert.IsNotNull(_camera, "No camera in scene"); }
} // Used by AI to turn shield on or off private void Start() { AOScript = gameObject.GetComponent <AudioOcclusion>(); if (!gameObject.CompareTag("Non-playables")) { startingHP = mech.health; currentHP = startingHP; normalShieldLevels = mech.defense; shields = mech.defense; shieldsChargesLeft = mech.shieldCharges; scoreHandler = GetComponent <ScoreHandler>(); isUsingShield = false; ShouldUseShield(false); } respawnManager = GameObject.Find("SpawnManager").GetComponent <SpawnParticipantIfAble>(); if (gameObject.CompareTag("Player")) { setVcamScript = GetComponent <SetVcamFollowAndLookAt>(); playerCamNoise = setVcamScript._vcam.GetComponent <PlayerCamNoise>(); } if (GetComponent <DoubleStatsSpecial>() != null) { doubleStats = GetComponent <DoubleStatsSpecial>(); } }
void Start() { Text myText = GetComponent <Text>(); myText.text = "Score: " + ScoreHandler.score.ToString(); ScoreHandler.ResetScore(); }
private void PickUpAction(PickUpItem pickUpItem) { _soundEffect.Play(); _success.Play(); ScoreHandler.AddPoint(); pickUpItem.Sprite.Alive = false; }
private void Start() { scoreHandler = new ScoreHandler(true); LastSnakePart = this; //Debug.Log(GetHashCode() + "sub"); GameManager.instanse.EnemyKilled += OnEnemyKilled; }
// Use this for initialization void Start() { input = FindObjectOfType <TouchInput>(); sh = input.sh; tm = input.tm; der = GetComponent <SphereCollider>(); }
public void ExitStage() { for (int i = 0; i < birds.Length; i++) { ScoreHandler.GetInstance().SetScore(i, 0); } }
// Start is called before the first frame update void Start() { topBorder = GameObject.Find("TopInside"); bottomBorder = GameObject.Find("BottomInside"); basket = GameObject.Find("Basket"); scoreHandler = basket.GetComponent <ScoreHandler>(); }
protected void SimulateBtn_Click(object sender, EventArgs e) { CourseHandler ch = new CourseHandler(); Course course = ch.GetCourse(Convert.ToInt32(CoursesDDL.SelectedValue)); if (Convert.ToInt32(CompletionDDL.SelectedValue) >= course.CompletionPercentage) { ScoreHandler sh = new ScoreHandler(); int score = sh.AddScore(Convert.ToInt32(CompletionDDL.SelectedValue), course.MaxScore, course.Id, Convert.ToInt32(UsersDDL.SelectedValue)); if (course.AchievementID > 0) { AchievementHandler ah = new AchievementHandler(); ah.GrantAchievement(Convert.ToInt32(UsersDDL.SelectedValue), course.AchievementID); Page.ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Du har gennemført " + course.Name + " og dermed optjent en ny achievement. Du scorede " + score + " point ud af " + course.MaxScore + ".');", true); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Du har gennemført " + course.Name + ". Du scorede " + score + " point ud af " + course.MaxScore + ".');", true); } } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('Du opfylder ikke kravene til at kunne gennemføre dette kursus.');", true); } }
void setMainmenu() { MainMenu mm = FindObjectOfType <MainMenu>(); try { int prestige = íëåäòéðåïîé.åêìóëîñçîèì(íëåäòéðåïîé.îðííçñòêîåï); if (prestige >= 10) { int level = ScoreHandler.ðïíîîðèéóíä(íëåäòéðåïîé.åêìóëîñçîèì(íëåäòéðåïîé.ìòêïíçëóïèí), íëåäòéðåïîé.åêìóëîñçîèì(íëåäòéðåïîé.îðííçñòêîåï)); int index = ~levels.BinarySearch(level); if (customBadges.TryGetValue(levels[index - 1], out Texture2D newBadgeTexture)) { if (newBadgeTexture.name != "NOTFOUND") { mm.menuBadge.texture = newBadgeTexture; } } return; } } catch (Exception e) { log("Failed to assign custom badge to a player in main menu"); log(e.Message); } }
float shootTimer = 0.0f; //timer counts up // Start is called before the first frame update void Start() { garden = GameObject.Find("House"); health = 100; scoreHandler = GameObject.Find("Score").GetComponent <ScoreHandler>(); gameStateHandler = GameObject.Find("GameStateManager").GetComponent <GameStateHandler>(); }
public BuildingSpawner(ScoreHandler _scoreHandler, InputHandler _inputHandler, Material _selectionMaterial, int _id) { scoreHandler = _scoreHandler; inputHandler = _inputHandler; selectionMaterial = _selectionMaterial; id = _id; }
// Start is called before the first frame update void Start() { myRigidBody2D = GetComponent <Rigidbody2D>(); scoreHandlerScript = ScriptableObject.CreateInstance <ScoreHandler>(); enemyParticlesObject = GameObject.Find("EnemyParticles"); endGameScript = ScriptableObject.CreateInstance <EndGame>(); }
public void gameOverUI() { hud.displayGameOver(true); if (scoreH != null) { ScoreHandler sH = scoreH.GetComponent <ScoreHandler>(); int moneyGained = sH.calculateGainedMoney(); IO.setMoney(IO.getMoney() + moneyGained); sH.printScore(); int correct = sH.amount_Large + sH.amount_Small + sH.amount_Package; if (gameOverTimeRanOut) { hud.setTextScoreTitle("Time ran out!"); } else { hud.setTextScoreTitle("Workday over"); } hud.setTextScoreTime(timer.getPrettyTimeLeft()); hud.setTextScorePorto(sH.amount_Porto.ToString()); hud.setTextScorePostCorrect(correct.ToString()); hud.setTextScorePostWrong(sH.amount_Wrong.ToString()); hud.setTextScoreStampedCorrect(sH.amount_Stamped.ToString()); hud.setTextScoreStampedWrong(sH.amount_notStamped.ToString()); hud.setTextScoreMoney("$" + moneyGained.ToString()); } }
void Awake() { instance = this; loadHighScoreFromPrefs(); loadLifeTimeScoreFromPrefs(); loadSpecialPointsFromPlayerPrefs(); loadNumberOfGamesFromPlayerPrefs(); }
void Awake() { if (instance == null) { instance = this; } StartCoroutine(XYZ()); }
// Use this for initialization void Start() { scoreHandler = GameObject.Find("ScoreHandler").GetComponent<ScoreHandler>(); if (scoreHandler == null) { Debug.LogError("Score system failed to initialize."); Destroy(this); } }
void Start() { text = GetComponent <Text>(); sizeChange = 1f; lastScore = 0; scoreHandler = GameObject.Find("Player").GetComponent <PlayerControls>().scoreHandler; }
public static ScoreHandler GetInstance() { if (instance == null) { instance = new ScoreHandler(); } return(instance); }
public void GameOver() { SceneManager.LoadScene("GameOverSzene"); unloadInactiveScenes(); ScoreHandler.gameOver(); sendResultJsonString(ScoreHandler.getJSONScoreString()); WebGLInput.captureAllKeyboardInput = false; }
private void Start() { _scoreHandler = GameManager.Instance.ScoreHandler; _scoreHandler.OnComboChange += _scoreHandler_OnComboChange; _text.text = "0"; _textCombo.text = ""; }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag.Equals("Wall")) { ScoreHandler.updateMostEnemiesHitAtOnce(EnemiesKilled); Destroy(gameObject); } }
// Assign event listeners when the game starts. void Start() { Instance = this; photonView = GetComponent <PhotonView>(); GameHandler.onGameStart += UpdateUI; GameHandler.onGameStart += UpdateKdaUI; GameHandler.onGameStart += OnGameStart; GameHandler.onGameEnd += OnGameEnd; }
public static ScoreHandler getInstance () { if ( _meInstance == null ) { _meInstance = GameObject.Find ( "mainPanel" ).GetComponent < ScoreHandler > (); } return _meInstance; }
void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "Player") { ScoreHandler sh = ScoreHandler.GetInstance(); sh.UpdateScore(this.myScore); Destroy(gameObject); } }
/// <summary> /// Funktion, bereitet die Endmenüinstanz vor. /// </summary> private void SetupEndMenuInterface() { ControllersParametersVariable.Instance.UsePointerRight = true; VRSF_Components.RightController.GetComponent <LineRenderer>().enabled = true; InstantiateScreen(ref _endMenuInterfaceInstance, EndMenuInterface, transform, true); _endMenuInterfaceInstance.transform.GetChild(1).GetComponent <Text>().text = ScoreHandler.GetPlayerScore().ToString(); }
private void UpdateText() { for (var i = 0; i < playerCount; i++) { int score = ScoreHandler.GetInstance().GetScore(i); int multiplier = ScoreHandler.GetInstance().GetComboCount(i); uiHolder[i].UpdateScore(score, multiplier); } }
// Use this for initialization void Start() { scoreUIObject = (GameObject)GameObject.Find ("ScoreUI"); scoreUIObject.GetComponent<Canvas> ().enabled = false; score = GameObject.Find ("Score"); scoreHandler = score.GetComponent<ScoreHandler>(); truck = GameObject.Find ("Truck").GetComponent<Truck> (); timeLeft = maxTime; loseScreen = false; winScreen = false; }
void Awake() { if (singleton == null) { singleton = this; } }
public void Init(LivesHandler handler, ScoreHandler handler1) { lvhandler = handler; schandler = handler1; }
// Use this for initialization void Start() { myAudio = GetComponent<AudioSource> (); gameController = GameObject.Find("GameController"); myScore = gameController.GetComponent<ScoreHandler>(); meter = GameObject.Find("ProgressBar"); meterBar = meter.GetComponent<MischiefMeter>(); rB = GetComponent<Rigidbody2D>(); mySprite = GetComponent<SpriteRenderer>(); spriteId = UnityEngine.Random.Range(0, foodSprites.Length); mySprite.sprite = foodSprites[spriteId]; pointsPos = new Vector2(transform.position.x, transform.position.y + initOffsetY); pointsPos2 = new Vector2(pointsPos.x + offsetX, pointsPos.y + offsetY); }
// Use this for initialization void Start() { scoreText = GameObject.Find ("Score").GetComponent<Text> (); score = this.GetComponentInParent<ScoreHandler> (); }
public static ScoreHandler GetInstance() { if (instance == null) instance = new ScoreHandler(); return instance; }