O'Reilly logo

HoloLens Beginner’s Guide by Jason Odom

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enums

We will use an enum or enumerated type to keep up with each state that we want to switch through. Here, we have an enum structure with multiple states in it, such as SharingInit, ConnectingToServer, SpatialMapping, MapComplete, PlaceSkeeMachine, PlaceSkeeMachineComplete, StartGame, EndGame, and Reset.

The beauty of the enum structure is that while each element, as far as the computer is concerned is elements 1 - 9 ( or 0-8 since I have the = 0 after the first one), but to you or me as a programmer, it can be hard to keep up with which state number 6 is as opposed to PlaceSkeeMachineComplete.

An enum has many uses, and while it is not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required