public static Transform GetWeaponNode(BodyMask body, int weaponnode) { if (body == null) { return null; } if (weaponnode != 1) { return body.LeftWeapon.transform; } return body.RightWeapon.transform; }
public void Read(EndianStream stream) { StateMachineIndex = stream.ReadUInt32(); StateMachineMotionSetIndex = stream.ReadUInt32(); BodyMask.Read(stream); SkeletonMask.Read(stream); Binding = stream.ReadUInt32(); LayerBlendingMode = stream.ReadInt32(); DefaultWeight = stream.ReadSingle(); IKPass = stream.ReadBoolean(); SyncedLayerAffectsTiming = stream.ReadBoolean(); stream.AlignStream(AlignType.Align4); }
public void Read(AssetReader reader) { StateMachineIndex = (int)reader.ReadUInt32(); StateMachineMotionSetIndex = (int)reader.ReadUInt32(); BodyMask.Read(reader); SkeletonMask.Read(reader); Binding = reader.ReadUInt32(); LayerBlendingMode = (AnimatorLayerBlendingMode)reader.ReadInt32(); if (HasDefaultWeight(reader.Version)) { DefaultWeight = reader.ReadSingle(); } IKPass = reader.ReadBoolean(); if (HasSyncedLayerAffectsTiming(reader.Version)) { SyncedLayerAffectsTiming = reader.ReadBoolean(); } reader.AlignStream(); }
public void Read(AssetStream stream) { StateMachineIndex = (int)stream.ReadUInt32(); StateMachineMotionSetIndex = (int)stream.ReadUInt32(); BodyMask.Read(stream); SkeletonMask.Read(stream); Binding = stream.ReadUInt32(); LayerBlendingMode = (AnimatorLayerBlendingMode)stream.ReadInt32(); if (IsReadDefaultWeight(stream.Version)) { DefaultWeight = stream.ReadSingle(); } IKPass = stream.ReadBoolean(); if (IsReadSyncedLayerAffectsTiming(stream.Version)) { SyncedLayerAffectsTiming = stream.ReadBoolean(); } stream.AlignStream(AlignType.Align4); }
public void Init(EntityBase entity) { this.m_Entity = entity; this.m_Body = this.m_Entity.m_Body; this.BodyMeshRenderer = this.m_Body.Body.GetComponent <SkinnedMeshRenderer>(); if (this.BodyMeshRenderer != null) { this.BodyMeshRenderer.sortingLayerName = "Player"; this.BodyMeshRenderer.shadowCastingMode = ShadowCastingMode.On; } else { this.BodyMeshRenderer2 = this.m_Body.Body.GetComponent <MeshRenderer>(); if (this.BodyMeshRenderer2 != null) { this.BodyMeshRenderer2.sortingLayerName = "Player"; this.BodyMeshRenderer2.shadowCastingMode = ShadowCastingMode.On; } } this.m_alphaShader = Shader.Find("Custom/OutLight"); this.m_deadShader = Shader.Find("Custom/DeadShader"); this.Property_Brightness = Shader.PropertyToID("_RimPower"); this.Property_EmissionColor = Shader.PropertyToID("_EmissionColor"); this.Property_RimColor = Shader.PropertyToID("_RimColor"); this.Property_TextureColor = Shader.PropertyToID("_TextureColor"); this.OnInit(); if (this.mMaterial != null) { if (this.m_Entity.IsElite) { this.mMaterial.shader = this.m_alphaShader; this.mMaterial.SetColor(this.Property_RimColor, new Color(0f, 0.2588235f, 1f)); this.mMaterial.SetFloat(this.Property_Brightness, 1.23f); this.SetLightShader(); } if (this.mMaterial.HasProperty(this.Property_Brightness)) { this.Brightness_valueinit = this.mMaterial.GetFloat(this.Property_Brightness); } } }
public static GameObject GenerateModel(string bodyPath, string weaponPath) { GameObject obj2 = Object.Instantiate <GameObject>(ResourceManager.Load <GameObject>(bodyPath)); if (!string.IsNullOrEmpty(weaponPath)) { GameObject child = Object.Instantiate <GameObject>(ResourceManager.Load <GameObject>(weaponPath)); if (child != null) { BodyMask component = obj2.GetComponent <BodyMask>(); if ((component != null) && (component.LeftWeapon != null)) { child.SetParentNormal(component.LeftWeapon); MeshRenderer componentInChildren = child.transform.GetComponentInChildren <MeshRenderer>(); if (((componentInChildren != null) && (componentInChildren.material != null)) && componentInChildren.material.HasProperty("_Factor")) { componentInChildren.material.SetFloat("_Factor", 0f); } } } } return(obj2); }
public abstract void AddTask(int bodyA, int bodyB, BodyMask maskA, BodyMask maskB);