コード例 #1
0
    void CastFirebolt()
    {
        _targetScript.length = 15;
        _targetScript.width  = 1;
        _targetScript.shape  = AoeTargetter.Shape.Rectangle;
        var yOffset = new Vector3(0, 2, 0);

        if (_targetScript.isTargetting)
        {
            var firebolt_object = Instantiate(_fireboltResource, transform.position + yOffset, Quaternion.identity);
            firebolt_object.GetComponent <SpellMovement>().Firebolt(0.05f, _targetScript.Activate());
        }
        else
        {
            _targetScript.StartTargeting();
        }
    }
コード例 #2
0
    void shieldCharge()
    {
        _targetScript.length = 8;
        _targetScript.width  = 1;
        _targetScript.shape  = AoeTargetter.Shape.Rectangle;
        var dashTimer = 0.6f;

        if (_targetScript.isTargetting)
        {
            _dashPoint = _targetScript.Activate();
            _isDashing = true; // TODO: Lock player input
            Invoke(nameof(StopDashing), dashTimer);
            Debug.Log(_dashPoint);
        }
        else
        {
            _targetScript.StartTargeting();
        }
    }