备份CatanBuilding瘦身独立工程
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99fbf16d5934a416a85df17b7891f64f
|
||||
folderAsset: yes
|
||||
timeCreated: 1476095881
|
||||
licenseType: Store
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,132 @@
|
||||
// This iOS haptic interface is a pretty straightforward implementation of UIKit's framework :
|
||||
// You can learn more about these methods at https://developer.apple.com/documentation/uikit/animation_and_haptics
|
||||
// DO NOT remove this from your project, or iOS vibrations won't work anymore!
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
UISelectionFeedbackGenerator* SelectionFeedbackGenerator;
|
||||
UINotificationFeedbackGenerator* NotificationFeedbackGenerator;
|
||||
UIImpactFeedbackGenerator* LightImpactFeedbackGenerator;
|
||||
UIImpactFeedbackGenerator* MediumImpactFeedbackGenerator;
|
||||
UIImpactFeedbackGenerator* HeavyImpactFeedbackGenerator;
|
||||
UIImpactFeedbackGenerator* SoftImpactFeedbackGenerator;
|
||||
UIImpactFeedbackGenerator* RigidImpactFeedbackGenerator;
|
||||
|
||||
// INIT METHOD ---------------------------------------------------------------------------
|
||||
|
||||
void InstantiateFeedbackGenerators()
|
||||
{
|
||||
SelectionFeedbackGenerator = [[UISelectionFeedbackGenerator alloc] init];
|
||||
NotificationFeedbackGenerator = [[UINotificationFeedbackGenerator alloc] init];
|
||||
LightImpactFeedbackGenerator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleLight];
|
||||
MediumImpactFeedbackGenerator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleMedium];
|
||||
HeavyImpactFeedbackGenerator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleHeavy];
|
||||
SoftImpactFeedbackGenerator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleSoft];
|
||||
RigidImpactFeedbackGenerator = [[UIImpactFeedbackGenerator alloc] initWithStyle:UIImpactFeedbackStyleRigid];
|
||||
}
|
||||
|
||||
// RELEASE METHOD ---------------------------------------------------------------------------
|
||||
|
||||
void ReleaseFeedbackGenerators ()
|
||||
{
|
||||
SelectionFeedbackGenerator = nil;
|
||||
NotificationFeedbackGenerator = nil;
|
||||
LightImpactFeedbackGenerator = nil;
|
||||
MediumImpactFeedbackGenerator = nil;
|
||||
HeavyImpactFeedbackGenerator = nil;
|
||||
SoftImpactFeedbackGenerator = nil;
|
||||
RigidImpactFeedbackGenerator = nil;
|
||||
}
|
||||
|
||||
// PREPARATION METHODS ----------------------------------------------------------------------
|
||||
|
||||
void PrepareSelectionFeedbackGenerator()
|
||||
{
|
||||
[SelectionFeedbackGenerator prepare];
|
||||
}
|
||||
|
||||
void PrepareNotificationFeedbackGenerator()
|
||||
{
|
||||
[NotificationFeedbackGenerator prepare];
|
||||
}
|
||||
|
||||
void PrepareLightImpactFeedbackGenerator()
|
||||
{
|
||||
[LightImpactFeedbackGenerator prepare];
|
||||
}
|
||||
|
||||
void PrepareMediumImpactFeedbackGenerator()
|
||||
{
|
||||
[MediumImpactFeedbackGenerator prepare];
|
||||
}
|
||||
|
||||
void PrepareHeavyImpactFeedbackGenerator()
|
||||
{
|
||||
[HeavyImpactFeedbackGenerator prepare];
|
||||
}
|
||||
|
||||
void PrepareSoftImpactFeedbackGenerator()
|
||||
{
|
||||
[SoftImpactFeedbackGenerator prepare];
|
||||
}
|
||||
|
||||
void PrepareRigidImpactFeedbackGenerator()
|
||||
{
|
||||
[RigidImpactFeedbackGenerator prepare];
|
||||
}
|
||||
|
||||
// FEEDBACK TRIGGER METHODS -------------------------------------------------------------------------
|
||||
|
||||
void SelectionHaptic()
|
||||
{
|
||||
[SelectionFeedbackGenerator prepare];
|
||||
[SelectionFeedbackGenerator selectionChanged];
|
||||
}
|
||||
|
||||
void SuccessHaptic()
|
||||
{
|
||||
[NotificationFeedbackGenerator prepare];
|
||||
[NotificationFeedbackGenerator notificationOccurred:UINotificationFeedbackTypeSuccess];
|
||||
}
|
||||
|
||||
void WarningHaptic()
|
||||
{
|
||||
[NotificationFeedbackGenerator prepare];
|
||||
[NotificationFeedbackGenerator notificationOccurred:UINotificationFeedbackTypeWarning];
|
||||
}
|
||||
|
||||
void FailureHaptic()
|
||||
{
|
||||
[NotificationFeedbackGenerator prepare];
|
||||
[NotificationFeedbackGenerator notificationOccurred:UINotificationFeedbackTypeError];
|
||||
}
|
||||
|
||||
void LightImpactHaptic()
|
||||
{
|
||||
[LightImpactFeedbackGenerator prepare];
|
||||
[LightImpactFeedbackGenerator impactOccurred];
|
||||
}
|
||||
|
||||
void MediumImpactHaptic()
|
||||
{
|
||||
[MediumImpactFeedbackGenerator prepare];
|
||||
[MediumImpactFeedbackGenerator impactOccurred];
|
||||
}
|
||||
|
||||
void HeavyImpactHaptic()
|
||||
{
|
||||
[HeavyImpactFeedbackGenerator prepare];
|
||||
[HeavyImpactFeedbackGenerator impactOccurred];
|
||||
}
|
||||
|
||||
void SoftImpactHaptic()
|
||||
{
|
||||
[SoftImpactFeedbackGenerator prepare];
|
||||
[SoftImpactFeedbackGenerator impactOccurred];
|
||||
}
|
||||
|
||||
void RigidImpactHaptic()
|
||||
{
|
||||
[RigidImpactFeedbackGenerator prepare];
|
||||
[RigidImpactFeedbackGenerator impactOccurred];
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7d619733c7b84d74bf48f308046fd0b
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user