public override void Attached() { CoopAnimal componentInChildren = base.GetComponentInChildren <CoopAnimal>(); if (!componentInChildren) { return; } if (componentInChildren._animator) { componentInChildren._animator.applyRootMotion = false; } if (componentInChildren.rotationTransform) { base.state.TransformPosition.SetTransforms(base.transform); base.state.TransformRotation.SetTransforms(componentInChildren.rotationTransform); } else { base.state.TransformFull.SetTransforms(base.transform); } CoopComponentDisabler exists = base.GetComponent <CoopComponentDisabler>(); if (!exists) { exists = base.gameObject.AddComponent <CoopComponentDisabler>(); } }
public override void Attached() { CoopAnimal componentInChildren = base.GetComponentInChildren <CoopAnimal>(); if (componentInChildren.rotationTransform) { base.state.TransformPosition.SetTransforms(base.transform); base.state.TransformRotation.SetTransforms(componentInChildren.rotationTransform); } else { base.state.TransformFull.SetTransforms(base.transform); } }
public override void OnEvent(syncAnimalState evnt) { if (!this.ValidateSender(evnt, SenderTypes.Any)) { return; } if (evnt.target) { CoopAnimal componentInChildren = evnt.target.GetComponentInChildren <CoopAnimal>(); if (componentInChildren) { componentInChildren.setOnSnow(evnt.onSnow); } } }
private void Awake() { mutantAI_net component = base.transform.GetComponent <mutantAI_net>(); if (component && component.creepy_boss) { base.enabled = false; return; } if (base.entity && base.entity.isAttached) { CoopAnimal componentInChildren = base.transform.GetComponentInChildren <CoopAnimal>(); if (componentInChildren && componentInChildren.birdType) { UnityEngine.Object.Destroy(this); } foreach (Renderer item in base.entity.GetComponentsInChildren <Renderer>()) { this.Renderers.Add(item); } foreach (Collider item2 in base.entity.GetComponentsInChildren <Collider>()) { this.Colliders.Add(item2); } if (!this.animator) { this.animator = base.entity.GetComponentInChildren <Animator>(); } if (base.entity.isFrozen) { this.DisableComponents(); } else { this.EnableComponents(); } } }