Stairs.GetDestinationFloor C# (CSharp) Méthode

GetDestinationFloor() public méthode

public GetDestinationFloor ( ) : int
Résultat int
    public int GetDestinationFloor()
    {
        // if the destination is above us, we go to the floor above, and vice versa
        return (destination.transform.position.y > transform.position.y) ? (floor + 1) : (floor - 1);
    }