예제 #1
0
    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;
    }
예제 #2
0
    // ==== 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>();
    }