void Awake() { lineRenderer = CommonUtil.GetComponentFromSelfOrChildren <LineRenderer>(this); // Make attraction. AI use this to check attraction point. attractionSource = gameObject.AddComponent <AttractionSource>(); AttractionSourceManager.Register(attractionSource); bodyToAimRelative = weaponAimPoint.position - transform.position; }
// ==== Life span ==== protected override void Awake() { base.Awake(); motor = GetComponent <PlayerMotor>(); CommonUtil.IfNullLogError <PlayerMotor>(motor); weaponManager = GetComponent <PlayerWeaponManager>(); CommonUtil.IfNullLogError <PlayerWeaponManager>(weaponManager); attractionSource = gameObject.AddComponent <AttractionSource>(); AttractionSourceManager.Register(attractionSource); ikController = GetComponentInChildren <AvatarIKController>(); }