コード例 #1
0
ファイル: Heal.cs プロジェクト: fantazac/LoL_Sandbox
 public override bool CanBeCast(Vector3 mousePosition)
 {
     if (!MousePositionOnTerrain.GetRaycastHit(mousePosition, out hit))
     {
         hit.point = Vector3.down;
     }
     return(true);
 }
コード例 #2
0
    private void PressedRightClick(Vector3 mousePosition)
    {
        bool hitTerrain       = MousePositionOnTerrain.GetRaycastHit(mousePosition, out hit);
        Unit closestEnemyUnit = FindClosestEnemyUnit();

        if (HoveredUnitIsAnEnemy(champion.Team))
        {
            champion.ChampionMovementManager.PrepareMovementTowardsTarget(HoveredUnit);
        }
        else if (closestEnemyUnit != null)
        {
            champion.ChampionMovementManager.PrepareMovementTowardsTarget(closestEnemyUnit);
        }
        else if (hitTerrain)
        {
            champion.ChampionMovementManager.PrepareMovementTowardsPoint(hit.point);
        }
    }
コード例 #3
0
 public override bool CanBeCast(Vector3 mousePosition)
 {
     return(MousePositionOnTerrain.GetRaycastHit(mousePosition, out hit));
 }