Esempio n. 1
0
 private Tree ChainTreePosition(Vector3 endPosition)
 {
     return(allTrees
            .Where(
                x => x.Distance2D(AbilityOwner) <= GetCastRange() &&
                NavMesh.GetCellFlags(x.Position).HasFlag(NavMeshCellFlags.Tree) && Math.Abs(
                    endPosition.Distance2D(x.Position) + AbilityOwner.Distance2D(x.Position)
                    - AbilityOwner.Distance2D(endPosition)) < 20)
            .OrderBy(x => AbilityOwner.Distance2D(x.Position))
            .ThenBy(x => AbilityOwner.FindRelativeAngle(x.Position))
            .FirstOrDefault());
 }
Esempio n. 2
0
 public float GetModiferRemainingTime()
 {
     return(AbilityOwner.Distance2D(modifierSource) / GetProjectileSpeed());
 }