示例#1
0
    void R()
    {
        ClearRange();
        selected = 'R';
        ShowRange(RRANGE);
        GLOBAL.DrawLine(transform.position + offset, RF.Mouse.transform.position, Color.red, .1f, RRANGE);

        if (GLOBAL.LeftClickHit())
        {
            RaycastHit h = GLOBAL.MousePosRay();
            Character  c = h.collider.GetComponent <Character>();
            if (GLOBAL.CheckCharacter(character, c))
            {
                target = h.transform;
                CharacterPlayerNav.MoveTo(c.transform.position);
                chasing = true;
            }
            else
            {
                target  = null;
                chasing = false;
            }
        }

        if (target != null && GLOBAL.HasReached(transform.position, target.position, BrandAbilities.RRANGE))
        {
            Shoot(selected);
        }
    }
示例#2
0
    void W()
    {
        ClearRange();
        selected = 'W';
        ShowRange(WRANGE);
        RF.Mouse.SetRange(3);
        GLOBAL.DrawLine(transform.position + offset, RF.Mouse.transform.position, Color.red, .1f, WRANGE);

        if (GLOBAL.LeftClickHit())
        {
            target = RF.Mouse.transform;
            CharacterPlayerNav.MoveTo(target.position);
            chasing = true;

            if (GLOBAL.HasReached(transform.position, target.position, BrandAbilities.WRANGE))
            {
                Shoot(selected);
            }
        }
    }