Пример #1
0
 /*----ON ENABLE----*/
 //For explanation, this is setting your public strings equal to the strings available buttons in a ControllerMap.
 //Choice of available buttons can be specified in the editor.
 void OnEnable()
 {
     Jump               = (string)map.GetType().GetField(JumpButton).GetValue(map) + "p";
     Interact           = (string)map.GetType().GetField(InteractButton).GetValue(map) + "p";
     Throw              = (string)map.GetType().GetField(ThrowButton).GetValue(map) + "p";
     HorizontalMovement = (string)map.GetType().GetField(HorizontalMovementAxis).GetValue(map) + "p";
     VerticalMovement   = (string)map.GetType().GetField(VerticalMovementAxis).GetValue(map) + "p";
     HorizontalLook     = (string)map.GetType().GetField(HorizontalLookAxis).GetValue(map) + "p";
     VerticalLook       = (string)map.GetType().GetField(VerticalLookAxis).GetValue(map) + "p";
     Taunt              = (string)map.GetType().GetField(TauntButton).GetValue(map) + "p";
 }