// Use this for initialization void Start() { tagSubject = new TagSubject(); observer = new ScoreObserver(tagSubject); tagSubject.attach(observer); observer = new ObjectActionObserver(tagSubject); tagSubject.attach(observer); HidePausePanel(); strips = new List <GameObject>(); isJumpingUp = isJumpingDown = isJumpingRight = isJumpingLeft = false; strips.Add(strip1); //strip1.name = "1"; strips.Add(strip2); //strip2.name = "2"; strips.Add(strip3); //strip3.name = "3"; strips.Add(strip4); //strip4.name = "4"; strips.Add(strip5); //strip5.name = "5"; strips.Add(strip6); //strip6.name = "6"; strips.Add(strip7); //strip7.name = "7"; strips.Add(strip8); //strip8.name = "8"; strips.Add(strip9); //strip9.name = "9"; strips.Add(strip10); //strip10.name = "10"; strips.Add(strip11); //strip11.name = "11"; strips.Add(strip12); //strip12.name = "12"; strips.Add(strip13); //strip13.name = "13"; strips.Add(strip14); //strip14.name = "14"; strips.Add(strip15); //strip15.name = "15"; strips.Add(strip16); //strip16.name = "16"; strips.Add(strip17); //strip17.name = "17"; stripsCurrentIndex = 0; initialPositionY = this.transform.position.y; HideGameOverPanel(); int isGameReloaded = PlayerPrefs.GetInt("reloaded"); if (isGameReloaded == 1) { PlayerPrefs.SetInt("reloaded", 0); ButtonStartPressed(); } int isGameResumed = PlayerPrefs.GetInt("resumed"); if (isGameResumed == 1) { PlayerPrefs.SetInt("resumed", 0); this.GetComponent <AudioSource> ().PlayOneShot(gameClip); gameIsPlaying = true; startPanel.SetActive(false); } }
public bool Equals(TagSubject <T> other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other._profile, _profile) && Equals(other._subject, _subject)); }
public bool Equals(TagSubject other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other.Profile, Profile) && Equals(other.Subject, Subject)); }
public Observer(TagSubject tagSubject) { this.tagSubject = tagSubject; }
public ScoreObserver(TagSubject tagSubject) : base(tagSubject) { }
public bool Equals(TagSubject other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Profile, Profile) && Equals(other.Subject, Subject); }
public ObjectActionObserver(TagSubject tagSubject) : base(tagSubject) { }