private void Start()
 {
     for (int i = 0; i < RawTextureArray.Length - 3; i += 4)
     {
         Texture4 tempTexture4 = new Texture4();
         tempTexture4.east  = RawTextureArray[i];
         tempTexture4.west  = RawTextureArray[i + 1];
         tempTexture4.south = RawTextureArray[i + 2];
         tempTexture4.north = RawTextureArray[i + 3];
         TextureDictionary.Add(characterName[i / 4], tempTexture4);
     }
     World.DefaultGameObjectInjectionWorld.GetExistingSystem <SCharacterApperanceModule>().appearanceDictionary = this;
 }
Exemple #2
0
 public void SetApperanceTextureJob()
 {
     Entities.ForEach((CCharacterAppearance characterAppearance, CCharacterBasicModule characterBasic) =>
     {
         if (characterAppearance.TextureSetFlag)
         {
             Texture4 texture4                  = appearanceDictionary.TextureDictionary[characterBasic.Name];
             characterAppearance.east           = texture4.east;
             characterAppearance.west           = texture4.west;
             characterAppearance.south          = texture4.south;
             characterAppearance.north          = texture4.north;
             characterAppearance.TextureSetFlag = false;
         }
     });
 }
Exemple #3
0
 private static void OnClose()
 {
     System.Media.SoundPlayer sh = new System.Media.SoundPlayer(@"C:\Users\DariusziElżbieta\Documents\3D_Rectangles\DDD\bin\Debug\shot.wav");
     sh.Play();
     Thread.Sleep(600);
     cube.Dispose();
     cubeUV.Dispose();
     cubeElements.Dispose();
     cubeNormals.Dispose();
     Texture1.Dispose();
     Texture2.Dispose();
     Texture3.Dispose();
     Texture4.Dispose();
     program.Dispose();
 }