1. Objective C / Говнокод #11936

    −100

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    -(void) pressed1st
    {	
        if (loopSound)
        {
            [self stopAllSounds];
        }
    	startLoopSoundS2 = NO;
    	startLoopSoundS3 = NO;
    	startLoopSoundS4 = NO;
    	startLoopSoundS5 = NO;
    	startLoopSoundS6 = NO;	
    	noteS1_act.alpha = 1;
    	string1_act.alpha = 1;
    	noteS1_act.hidden = NO;
    	string1_act.hidden = NO;
    	
    	if (!startLoopSoundS1)
    	{
    		[delegate playSoundByFret:currentSound.strings[1] onString:1 loop:loopSound];
    		if (loopSound)
    			startLoopSoundS1 = YES;
    		else
    			[self runAnimationForString:string1_act withNoteView:noteS1_act];
    	}
    	else
    	{
    		startLoopSoundS1 = NO;
    		[delegate stopSoundNote:1];
    		noteS1_act.hidden = YES;
    		string1_act.hidden = YES;
    	}	
    	noteS2_act.hidden = YES;
    	string2_act.hidden = YES;	
    	noteS3_act.hidden = YES;
    	string3_act.hidden = YES;	
    	noteS4_act.hidden = YES;
    	string4_act.hidden = YES;	
    	noteS5_act.hidden = YES;
    	string5_act.hidden = YES;	
    	noteS6_act.hidden = YES;
    	string6_act.hidden = YES;
    }
    
    -(void) pressed2nd
    {
        if (loopSound)
        {
            [self stopAllSounds];
        }
    	
    	startLoopSoundS1 = NO;
    	startLoopSoundS3 = NO;
    	startLoopSoundS4 = NO;
    	startLoopSoundS5 = NO;
    	startLoopSoundS6 = NO;	
    	noteS2_act.alpha = 1;
    	string2_act.alpha = 1;
    	noteS2_act.hidden = NO;
    	string2_act.hidden = NO;
    	
    	if (!startLoopSoundS2)
    	{
    		[delegate playSoundByFret:currentSound.strings[2] onString:2 loop:loopSound];
    		if (loopSound)
    			startLoopSoundS2 = YES;
    		else
    			[self runAnimationForString:string2_act withNoteView:noteS2_act];
    	}
    	else
    	{
    		startLoopSoundS2 = NO;
    		[delegate stopSoundNote:2];
    		noteS2_act.hidden = YES;
    		string2_act.hidden = YES;
    	}
    	
    	noteS1_act.hidden = YES;
    	string1_act.hidden = YES;	
    	noteS3_act.hidden = YES;
    	string3_act.hidden = YES;	
    	noteS4_act.hidden = YES;
    	string4_act.hidden = YES;	
    	noteS5_act.hidden = YES;
    	string5_act.hidden = YES;	
    	noteS6_act.hidden = YES;
    	string6_act.hidden = YES;
    }

    Всего 6 методов.
    Творчество моего любимого автора.

    Запостил: QuickNick, 16 Октября 2012

    Комментарии (9) RSS

    • >>YES

      DA, this will work.
      Ответить
      • В Foundation-фреймворке (не знаю зачем) определен на основе типа boolean тип BOOL, имеющий значение YES/NO.

        Причины этого мне неизвестны.
        Ответить

    Добавить комментарий