18.08.2011, 18:39
You know on pastebin has a box on the right hand side that shows you the newest pastebins online? I saw this one and wondered what it does/what its for if anyone knows.
Код:
public void Update() { if(Swimming.InWater) { currentMovement = Swimming; if(Swimming.AtSurface) { bool jumping = InputButton.Button(ButtonNames.Jump); if(jumping) { SetCurrentMovementToDefault(new DefaultMovement.InitializeDefaultMovement(Swimming.activePlatform, Swimming.lastPlatform)); } } } else { //How do we know we came from water? :( //currentMovement = Default; // HORE SKJALG DET HЖR GJOR TE AT ALT Ж GJOR VART NULLA UT AV KUKEN HER LOL } // Grappling HookButton if (InputButton.ButtonDown(ButtonNames.Use)) { if (GrapplingHookRope.Enabled) { GrapplingHookRope.Cancel(); SetCurrentMovement(Default); } else { GameObject attachmentPoint = GetAttachmentPoint(); if(attachmentPoint != null) { GrapplingHookRope.Launch(transform, attachmentPoint.transform); } } if (currentMovement.GetType() == typeof(GrapplingHook)) { SetCurrentMovement(Default); } } // Jump Button if(InputButton.Button(ButtonNames.Jump)) { if(GrapplingHookRope.Enabled) { GrapplingHookRope.Cancel(); SetCurrentMovement(Default); } if(currentMovement.GetType() == typeof(GrapplingHook)) { SetCurrentMovement(Default); } } currentMovement.Movement(); debug = currentMovement.GetType().Name; }