Пример #1
0
    public void ThrowShield(Vector3 position)
    {
        auxShield.transform.SetParent(null);
        auxShield.transform.rotation = Quaternion.Euler(new Vector3(-90, 0, 0));
        _hero.ToggleBlock(false);
        auxShield.SetActive(true);
        _shield.SetActive(false);

        flying.Play();

        RaycastHit hit;

        if (Physics.Raycast(transform.position, _hero.GetCharMove().GetRotatorDirection(), out hit, throwRange, raycastMask))
        {
            spinPosition = hit.point - _hero.GetCharMove().GetRotatorDirection();
        }
        else
        {
            spinPosition = _shield.transform.position + _hero.GetCharMove().GetRotatorDirection() * throwRange;
        }

        startingPos = _shield.transform.position;


        timeCount    = 0;
        shieldStates = boomerangShieldStates.isGoing;
    }
Пример #2
0
 private void SetGhostSword(bool isHeavy)
 {
     //atenaImage.transform.position = charHead.transform.position + Vector3.up * 3;
     //atenaImage.GetComponent<ParticleSystem>().Play();
     atenea.AteneaAttack();
     atenea.transform.position = charHead.transform.position;
     atenea.transform.rotation = Quaternion.LookRotation(charHead.GetCharMove().GetLookDirection(), Vector3.up);
     ghostSword.localPosition  = charHead.transform.position + charHead.GetCharMove().GetLookDirection() * _characterAttack.currentWeapon.GetWpnRange() + Vector3.up;
     ghostSword.rotation       = Quaternion.LookRotation(charHead.GetCharMove().GetLookDirection(), Vector3.up);
     ghostSword.gameObject.SetActive(true);
 }
Пример #3
0
    protected override void OnStartUse()
    {
        _hero.ToggleBlock(false);
        auxShield.SetActive(true);
        auxShield.transform.position = _shield.transform.position;
        _shield.SetActive(false);
        sparks.Play();
        auraZone.Play();
        var auraMain = auraZone.main;

        auraMain.startSize = radius * 2;



        spinPosition           = auxShield.transform.position + (_hero.GetCharMove().GetRotatorDirection() * throwRange);
        startHeroPos           = _shield.transform.position;
        startHeroLookDirection = _hero.GetCharMove().GetRotatorDirection();

        startTime = Time.time;
        isGoing   = true;
    }
    protected override void OnUpdateUse()
    {
        lightBeam.transform.position = _hero.transform.position;
        Debug.Log(blocker.onBlock);
        if (blocker.onBlock)
        {
            ShootLaserFromTargetPosition(_hero.transform.position + Vector3.up * 1, _hero.GetCharMove().GetRotatorDirection(), range);

            _lineRenderer.enabled = true;
        }
        else
        {
            _lineRenderer.enabled = false;
        }
    }
Пример #5
0
    protected override void OnBeginSkill()
    {
        if (_hero == null)
        {
            _hero = FindObjectOfType <CharacterHead>();
        }

        if (_movement == null)
        {
            _movement = _hero.GetCharMove();
        }

        _hero.ChangeDashForTeleport();

        _movement.ConfigureTeleport(teleportDistance);

        teleportEnabled = true;
    }