facing() public méthode

Checks if this Character is facing another Interactable (e.g. other Character); used as a check for talking action
public facing ( IInteractable other ) : bool
other IInteractable The other Interactable
Résultat bool
Exemple #1
0
 /// <summary>
 /// Checks if two Characters are facing each other
 /// </summary>
 /// <param name="other">The other Character</param>
 /// <returns>True if both characters are facing each other, false if not</returns>
 public bool bothFacing(Character other)
 {
     return this.facing(other) && other.facing(this);
 }