//patruyaje IEnumerator patrol(float time) { isPatrolling = true; while (EnemyState == botStates.waiting) { if (gameManager.instance.IsPaused) { isPatrolling = false; yield break; } if (Axis == Vector2.zero) { Axis = (new Vector2(Random.Range(-1f, 1f), Random.Range(-1f, 1f))).normalized; if (!Aud.isPlaying) { Aud.Play(); } } else { Aud.Stop(); Axis = Vector2.zero; } Anim.SetFloat("speed", Axis.magnitude); yield return(new WaitForSeconds(time)); } isPatrolling = false; }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (Type.Length != 0) { hash ^= Type.GetHashCode(); } if (Aud.Length != 0) { hash ^= Aud.GetHashCode(); } if (Origin.Length != 0) { hash ^= Origin.GetHashCode(); } if (Content.Length != 0) { hash ^= Content.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public IEnumerable <IModule> GetModules() { yield return(Sec.Module <DnsDomain>()); yield return(SecurityUI.Module <DnsDomain>()); yield return(Aud.Module <DnsDomain>()); yield return(AuditUI.Module <DnsDomain>()); yield return(Mvc.Boilerplate.JsBootstrap()); }
protected virtual IEnumerator attack(float animationTime) { //Anim.SetTrigger("attack"); Aud.PlayOneShot(audioAttack); yield return(new WaitForSeconds(animationTime / 2)); //Desplega el damageBox damageBox.localPosition = new Vector3(0, 0, 0); damageBox.localScale = Vector3.one; yield return(new WaitForSeconds(animationTime / 2)); //reset damagebox damageBox.localScale = Vector3.zero; }
protected override IEnumerator attack(float animationTime) { isAttacking = true; Anim.SetTrigger("attack"); yield return(new WaitForSeconds(animationTime / 2)); //Desplega el damageBox Aud.PlayOneShot(audioAttack); damageBox.localPosition = Vector3.zero; damageBox.localScale = Vector3.one; yield return(new WaitForSeconds(animationTime / 2)); //reset damagebox damageBox.localScale = Vector3.zero; isAttacking = false; }
protected virtual void GetHurt(int inDamageValue) { if (!invulnerable) { Health -= (inDamageValue - defense); if (Health > 0) { //Anim.SetTrigger("Hurt"); Aud.PlayOneShot(audioDamage); } else { //Anim.SetTrigger("Die"); Aud.PlayOneShot(audioDeath); Destroy(gameObject, audioDeath.length); } invulnerable = true; StartCoroutine(ModifierCountDown(1, (x) => invulnerable = x)); } }
protected virtual void GetHurt(int inDamageValue) { if (!invulnerable) { Health -= (inDamageValue - defense); if (Health > 0) { Aud.PlayOneShot(audioDamage); Anim.SetTrigger("damage"); } else { Aud.PlayOneShot(audioDeath); Anim.SetTrigger("death"); } invulnerable = true; if (Health > 0) { StartCoroutine(ModifierCountDown(1, (x) => invulnerable = x)); } } }
/// <summary> /// Method that validates the ID Token. /// </summary> /// <param name="ExpectedIss">Expected value for issuer.</param> /// <param name="ExpectedAud">Expected value for audience.</param> /// <param name="ExpectedCHash">Expected value for c_hash (optional).</param> /// <param name="ExpectedAtHash">Expected value for at_hash (optional).</param> public void Validate(string ExpectedIss, string ExpectedAud, string ExpectedCHash = null, string ExpectedAtHash = null) { Validate(); if (Iss != ExpectedIss) { throw new OIDCException("Wrong issuer in id token."); } if (!Aud.Contains(ExpectedAud)) { throw new OIDCException("Wrong audience for the released id token."); } if (ExpectedCHash != null && CHash != ExpectedCHash) { throw new OIDCException("Wrong c_hash for the released id token."); } if (ExpectedAtHash != null && AtHash != ExpectedAtHash) { throw new OIDCException("Wrong at_hash for the released id token."); } }
protected override void GetHurt(int inDamageValue) { if (!invulnerable) { Health -= (inDamageValue - defense); if (Health > 0) { Aud.PlayOneShot(audioDamage); Anim.SetTrigger("damage"); } else { Aud.PlayOneShot(audioDeath); EnemyState = botStates.dying; Anim.SetTrigger("death"); gameManager.instance.StartCoroutine(DespawnNWait(RespawnTime)); } invulnerable = true; if (Health > 0) { StartCoroutine(ModifierCountDown(1, (x) => invulnerable = x)); } } }
public UserPropVisualizer() : base(u => (u as ISecuritySubject).DisplayName, Aud.Property((Events.PasswordNag e) => e.TargetUser), Aud.Property((Events.NewRequest e) => e.ActingUser)) { }
private void Update() { //Controles dentro del juego if (!gameManager.instance.IsPaused) { changeAxis(); if (Rigid.velocity.magnitude > 0f) { if (!Aud.isPlaying) { Aud.Play(); } } else { Aud.Stop(); } //interactua con objeto if (Input.GetButtonDown("Fire1") && interactionTarget != null) { gameManager.instance.IsPaused = true; gameManager.instance.InScene = true; interactionTarget.nextDialogue(); } else if (Input.GetButtonDown("Fire1") && !isAttacking) { StartCoroutine(attack(1)); } if (Input.GetButtonDown("Cancel")) { if (!gameManager.instance.InScene) { pauseGame(); } } } //controles de escena else if (gameManager.instance.InScene) { if (Input.GetButtonDown("Fire1")) { interactionTarget.nextDialogue(); } if (Input.GetButtonDown("Cancel")) { interactionTarget.endConversation(); } } //Controles de pausa else if (Input.GetButtonDown("Cancel")) { if (!gameManager.instance.InScene) { pauseGame(); } } if (Health <= 0) { SceneManager.LoadScene(0); } }
public ProjectPropVisualizer() : base(r => r.Name, Aud.Property((Events.RequestStatusChange e) => e.Project)) { }
public DataMartPropVisualizer() : base(dm => dm.Name + " (" + dm.ID + ")", Aud.Property((Events.RequestStatusChange e) => e.DataMart)) { }
private void Update() { //pausa if (gameManager.instance.IsPaused) { return; } //IA switch (EnemyState) { case botStates.waiting: //inicia patrullaje en caso de no haberse activado ya if (!isPatrolling) { StartCoroutine(patrol(patrolTime)); } //revisa constamente en busqueda del objetivo a atacar if (Vector3.Distance(gameManager.instance.player.position, transform.position) <= visionDistance) { if (Vector3.Angle(gameManager.instance.player.position, transform.position) <= visionRange) { EnemyState = botStates.chase; } } break; case botStates.chase: if (!Aud.isPlaying) { Aud.Play(); } if (Axis != Vector2.zero) { Axis = Vector2.zero; } if (Vector3.Distance(gameManager.instance.player.position, transform.position) <= chaseDistance) { if (Vector3.Distance(gameManager.instance.player.position, transform.position) <= attackDistance) { Anim.SetFloat("speed", 0f); EnemyState = botStates.attack; } else { Nav.SetDestination(gameManager.instance.player.position); Anim.SetFloat("speed", 1f); } } else { EnemyState = botStates.waiting; } break; case botStates.attack: Aud.Stop(); if (!isAttacking) { transform.LookAt(gameManager.instance.player); StartCoroutine(attack(attackTime)); } break; case botStates.dying: //Deja de realizar acciones break; default: Debug.Log("Error en update del objeto" + transform.name); break; } }
public OrganizationPropVisualizer() : base(o => o.Name, Aud.Property((Events.OrganizationCrud e) => e.Organization)) { }
public GroupPropVisualizer() : base(g => g.Name, Aud.Property((Events.GroupCrud e) => e.Group)) { }
/// <summary> /// Returns true if JWToken instances are equal /// </summary> /// <param name="other">Instance of JWToken to be compared</param> /// <returns>Boolean</returns> public bool Equals(JWToken other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Iss == other.Iss || Iss != null && Iss.Equals(other.Iss) ) && ( Sub == other.Sub || Sub != null && Sub.Equals(other.Sub) ) && ( Aud == other.Aud || Aud != null && Aud.Equals(other.Aud) ) && ( Exp == other.Exp || Exp != null && Exp.Equals(other.Exp) ) && ( Nbf == other.Nbf || Nbf != null && Nbf.Equals(other.Nbf) ) && ( Iat == other.Iat || Iat != null && Iat.Equals(other.Iat) ) && ( Jti == other.Jti || Jti != null && Jti.Equals(other.Jti) ) && ( Uuid == other.Uuid || Uuid != null && Uuid.Equals(other.Uuid) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( GivenName == other.GivenName || GivenName != null && GivenName.Equals(other.GivenName) ) && ( Nickname == other.Nickname || Nickname != null && Nickname.Equals(other.Nickname) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( EmailVerified == other.EmailVerified || EmailVerified != null && EmailVerified.Equals(other.EmailVerified) ) && ( Zoneinfo == other.Zoneinfo || Zoneinfo != null && Zoneinfo.Equals(other.Zoneinfo) ) && ( Locale == other.Locale || Locale != null && Locale.Equals(other.Locale) ) && ( Cnf == other.Cnf || Cnf != null && Cnf.Equals(other.Cnf) ) && ( Orig == other.Orig || Orig != null && Orig.Equals(other.Orig) ) && ( Dest == other.Dest || Dest != null && Dest.Equals(other.Dest) ) && ( Mky == other.Mky || Mky != null && Mky.Equals(other.Mky) )); }
public RequestPropVisualizer() : base(r => r.Name + " (" + r.ID + ")", Aud.Property((Events.RequestStatusChange e) => e.Request)) { }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Iss != null) { hashCode = hashCode * 59 + Iss.GetHashCode(); } if (Sub != null) { hashCode = hashCode * 59 + Sub.GetHashCode(); } if (Aud != null) { hashCode = hashCode * 59 + Aud.GetHashCode(); } if (Exp != null) { hashCode = hashCode * 59 + Exp.GetHashCode(); } if (Nbf != null) { hashCode = hashCode * 59 + Nbf.GetHashCode(); } if (Iat != null) { hashCode = hashCode * 59 + Iat.GetHashCode(); } if (Jti != null) { hashCode = hashCode * 59 + Jti.GetHashCode(); } if (Uuid != null) { hashCode = hashCode * 59 + Uuid.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (GivenName != null) { hashCode = hashCode * 59 + GivenName.GetHashCode(); } if (Nickname != null) { hashCode = hashCode * 59 + Nickname.GetHashCode(); } if (Email != null) { hashCode = hashCode * 59 + Email.GetHashCode(); } if (EmailVerified != null) { hashCode = hashCode * 59 + EmailVerified.GetHashCode(); } if (Zoneinfo != null) { hashCode = hashCode * 59 + Zoneinfo.GetHashCode(); } if (Locale != null) { hashCode = hashCode * 59 + Locale.GetHashCode(); } if (Cnf != null) { hashCode = hashCode * 59 + Cnf.GetHashCode(); } if (Orig != null) { hashCode = hashCode * 59 + Orig.GetHashCode(); } if (Dest != null) { hashCode = hashCode * 59 + Dest.GetHashCode(); } if (Mky != null) { hashCode = hashCode * 59 + Mky.GetHashCode(); } return(hashCode); } }