public void AssignID(bool redo = false) { if (this.ID > 0 && (redo || String.IsNullOrWhiteSpace(SearchID))) { this.SearchID = HashID.GenHash(this.ID); } }
private void Awake() { anim = GetComponent <Animator> (); hash = GameObject.FindWithTag(Tags.GameController).GetComponent <HashID> (); player = GameObject.FindWithTag(Tags.Player); playerInventory = player.GetComponent <PlayerInventory> (); }
private void Awake() { anim = GetComponent <Animator> (); playerMovement = GetComponent <PlayerMovement> (); hash = GameObject.FindWithTag(Tags.GameController).GetComponent <HashID> (); sceneFadeInOut = GameObject.FindWithTag(Tags.Fader).GetComponent <SceneFadeInOut> (); lastPlayerSighting = GameObject.FindWithTag(Tags.GameController).GetComponent <LastPlayerSighting> (); }
void Awake() { // Setting up the references. anim = GameObject.FindGameObjectWithTag(Tags.player).GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.player).GetComponent<HashID>(); // Set the weight of the shouting layer to 1. }
protected Material GetMaterial(HashID _id) { if (!m_Materials.ContainsKey(_id)) { return(null); } return(m_Materials [_id]); }
private Vector3 previousSighting; //上一帧player对象被观察到的位置 private void Awake() { nav = GetComponent <NavMeshAgent> (); col = GetComponent <SphereCollider> (); anim = GetComponent <Animator> (); lastPlayerSighting = GameObject.FindWithTag(Tags.GameController).GetComponent <LastPlayerSighting> (); player = GameObject.FindWithTag(Tags.Player); playerAnim = player.GetComponent <Animator> (); playerHealth = player.GetComponent <PlayerHealth> (); hash = GameObject.FindWithTag(Tags.GameController).GetComponent <HashID> (); personalLastSighting = lastPlayerSighting.resetPosition; previousSighting = lastPlayerSighting.resetPosition; }
private void Awake() { player = GameObject.FindWithTag(Tags.Player).transform; enemySight = GetComponent <EnemySight> (); nav = GetComponent <NavMeshAgent> (); anim = GetComponent <Animator> (); hash = GameObject.FindWithTag(Tags.GameController).GetComponent <HashID> (); nav.updatePosition = false; //表示不允许Nav Mesh Agent 更新Enemy001对象的方向 locomotion = new SimpleLocomotion(anim, hash); anim.SetLayerWeight(1, 1f); anim.SetLayerWeight(2, 1f); deadZone *= Mathf.Deg2Rad; //将deadZone从角度转到弧度 }
private void Awake() { anim = GetComponent <Animator> (); laserShotLine = GetComponentInChildren <LineRenderer> (); laserShotLight = laserShotLine.gameObject.GetComponent <Light> (); col = GetComponent <SphereCollider> (); player = GameObject.FindWithTag(Tags.Player).transform; playerHealth = player.gameObject.GetComponent <PlayerHealth> (); hash = GameObject.FindWithTag(Tags.GameController).GetComponent <HashID> (); laserShotLine.enabled = false; laserShotLight.intensity = 0f; scaledDamage = maximumDamage - minimumDamage; }
public void SaveInfo() { if (HashID.IsNull()) { objHash = new Sys_Hash(); objHash.HashTypeID = HashTypeID; objHash.HashValue = txtHashValue.Text; objHash.HashKey = txtHashKey.Text; objHash.Remark = txtRemark.Text; objHashRule.InsertHash(objHash); MessageDialogContinue("添加成功", "../../ServiceLayer/HashType/HashList.aspx?HashTypeID=" + HashTypeID.ToString()); } else { objHash = objHashRule.Sys_Hash.First(p => p.HashID == HashID); objHash.HashValue = txtHashValue.Text; objHash.HashKey = txtHashKey.Text; objHash.Remark = txtRemark.Text; objHashRule.SaveChanges(); MessageDialog("保存成功", "../../ServiceLayer/HashType/HashList.aspx?HashTypeID=" + HashTypeID.ToString()); } }
protected Material LoadMaterial(HashID _id) { var _shaderName = _id.ToString(); if (m_Materials.ContainsKey(_id)) { Debug.LogWarningFormat("possible duplicated LoadMaterial {0}", _shaderName); return(m_Materials [_id]); } Shader _shader = Shader.Find(_shaderName); if (null == _shader) { Debug.LogErrorFormat("shader {0} not found", _shaderName); return(null); } var _mtl = new Material(_shader); _mtl.hideFlags = HideFlags.HideAndDontSave; m_Materials.Add(_id, _mtl); return(_mtl); }
private void Awake() { animator = GetComponent <Animator> (); hash = GameObject.FindWithTag(Tags.GameController).GetComponent <HashID> (); animator.SetLayerWeight(1, 1f); //设置序号为1的动画层权重为1f 即shouting动画层 1f }
public MaterialAttribute(string _name) { Id = new HashID(_name); }
public SimpleLocomotion(Animator animator, HashID hashIDs) { anim = animator; hash = hashIDs; }
private void Awake() { animator = this.GetComponent <Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <HashID>(); animator.SetLayerWeight(1, 1f); }
private FString(String str, HashID id) { mName = str; mID = id; }
public CPUHelper(Animator anim, HashID hash) { this.anim = anim; this.hash = hash; }
/// <summary> /// 创建一个FString /// </summary> /// <param name="hash_id">哈希码</param> /// <returns>创建后的FString</returns> public static FString CreateString(HashID hash_id) { return new FString(null, hash_id); }
void Start() { m_Anim = GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<HashID>(); m_Rigidbody = GetComponent<Rigidbody>(); m_Rigidbody.constraints = RigidbodyConstraints.FreezeRotation; m_OriginGroundCheckDistance = m_GroundCheckDistance; }
private void Start() { m_anim = GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<HashID>(); m_AttackDis.Add(m_AttackState.attack01, new AttackInfo(1, 0.6f)); m_AttackDis.Add(m_AttackState.attack02, new AttackInfo(2, 0.5f)); m_AttackDis.Add(m_AttackState.attack03, new AttackInfo(3, 0.5f)); }