示例#1
0
    void GetMouseInput()
    {
        ReticleMove();

        Vector3 ReticleDir = transform.DirectionTo(reticle.transform);

        if (Input.GetMouseButtonDown(1))
        {
            //Do something on button 2 press?
        }
        if (Input.GetMouseButton(0))
        {
            TryAttack(ReticleDir.x, ReticleDir.z);
        }

        if (!LookWhereMove() && transform.DistanceTo(reticle.transform) > 5)
        {
            cM.RotateTo(ReticleDir, usingMouse());
        }
    }
示例#2
0
    public virtual void RotateToPlayer()
    {
        Vector3 dir = transform.DirectionTo(playerTarget.transform);

        cM.RotateTo(dir, false);
    }