void OnMouseOver()
 {
     if (Input.GetMouseButtonDown(1))
     {
         print("right click-----------------------------------------------------------------------------------------------------------");
         CombatLoop cl = GameObject.FindWithTag("Manager").GetComponent <CombatLoop>();
         cl.GetCurrentUnit().PathTo(tileX, tileY);
     }
 }
Пример #2
0
    // Start is called before the first frame update
    protected void Start()
    {
        _animator          = GetComponent <Animator>();
        meleeRange         = 2f;
        longRange          = 0f;
        healingPotionCount = 2;
        sumRotationTime    = 0f;
        isCurrent          = false;
        _rotating          = false;
        _gotPhi            = false;
        cl       = GameObject.FindWithTag("Manager").GetComponent <CombatLoop>();
        pathIdx  = 0;
        _goalSet = false;
        goal     = new Vector3(0f, 0f, 0f);

        path = null;
    }