private void Start() { controller = GetComponent <Controller>(); animator = controller.animator; animParam = controller.animParam; myCollider = GetComponent <Collider>(); }
public static void SetAnimParam(AnimatorParameter animatorParameter) { if (animParam == null) { animParam = animatorParameter; } }
protected virtual void Awake() { GM.SetPlayer(this); bodyPart = new BodyPart(transform); if (animator == null) { animator = GetComponent <Animator>(); animParam = new AnimatorParameter(animator); GM.SetAnimParam(animParam); } thirdPersonCamera = gameObject.AddComponent <ThirdPersonCamera>(); footPlacement = gameObject.AddComponent <FootPlacement>(); detector = gameObject.AddComponent <Detector>(); equipHolster = gameObject.AddComponent <EquipHolster>(); attacking = gameObject.AddComponent <Attacking>(); gaugeManager = FindObjectOfType <GaugeManager>(); InstantiateTrails(); }