Large diffs are not rendered by default.

@@ -2,32 +2,56 @@
using System.Collections;

public class PlayerBehaviour : MonoBehaviour {

public int playerNumber;
public float speed = 10;
public GameObject anchor;
public float maxRangeFromAnchor = 3;

public float dashDuration = 0.3f;
public float dashCooldown = 1;
public float dashSpeed = 30;

private Vector3 _dash = new Vector3();
private float _dashTimer = 0f;
private float _dashCooldown = 0f;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void FixedUpdate () {

string horizAxisString = "Horizontal"+(playerNumber==1?"":playerNumber.ToString());
string vertAxisString = "Vertical"+(playerNumber==1?"":playerNumber.ToString());

string dashString = "Dash" + playerNumber;

Vector3 movement = new Vector3 (Input.GetAxis(horizAxisString), Input.GetAxis(vertAxisString), 0) * speed * Time.deltaTime;

if (movement.magnitude > speed)
movement = movement.normalized * speed * Time.deltaTime;



/*if (_dashTimer > 0) {
movement = _dash;
_dashTimer -= Time.deltaTime;
} else if (Input.GetButton (dashString) && _dashCooldown <= 0) {
_dashTimer = dashDuration;
_dashCooldown = dashCooldown;
_dash = movement.normalized * dashSpeed * Time.deltaTime;
} else {
_dashCooldown -= Time.deltaTime;
}//*/

Vector3 distanceFromAnchor = transform.position - anchor.transform.position;
if ((distanceFromAnchor + movement).magnitude > maxRangeFromAnchor) {
movement -= (distanceFromAnchor - distanceFromAnchor.normalized * maxRangeFromAnchor);
}//*/

}
transform.position += movement;
}
}
BIN +418 KB Assets/selector.blend
Binary file not shown.
Binary file not shown.
BIN +14.3 KB Assets/selector.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -8,7 +8,6 @@ PlayerSettings:
defaultScreenOrientation: 4
targetDevice: 2
targetResolution: 0
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: GameJamProject
@@ -29,7 +28,6 @@ PlayerSettings:
androidShowActivityIndicatorOnLoading: -1
iosAppInBackgroundBehavior: 0
displayResolutionDialog: 1
iosAllowHTTPDownload: 1
allowedAutorotateToPortrait: 1
allowedAutorotateToPortraitUpsideDown: 1
allowedAutorotateToLandscapeRight: 1
@@ -62,23 +60,11 @@ PlayerSettings:
xboxSpeechDB: 0
xboxEnableHeadOrientation: 0
xboxEnableGuest: 0
n3dsDisableStereoscopicView: 0
n3dsEnableSharedListOpt: 1
n3dsEnableVSync: 0
xboxOneResolution: 0
ps3SplashScreen: {fileID: 0}
videoMemoryForVertexBuffers: 0
psp2PowerMode: 0
psp2AcquireBGM: 1
wiiUTVResolution: 0
wiiUGamePadMSAA: 1
wiiUSupportsNunchuk: 0
wiiUSupportsClassicController: 0
wiiUSupportsBalanceBoard: 0
wiiUSupportsMotionPlus: 0
wiiUSupportsProController: 0
wiiUAllowScreenCapture: 1
wiiUControllerCount: 0
m_SupportedAspectRatios:
4:3: 1
5:4: 1
@@ -91,26 +77,20 @@ PlayerSettings:
metroEnableIndependentInputSource: 0
metroEnableLowLatencyPresentationAPI: 0
xboxOneDisableKinectGpuReservation: 0
virtualRealitySupported: 0
productGUID: dbca7936984e94248bf9f90833bc0c3a
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 9
AndroidPreferredInstallLocation: 1
aotOptions:
apiCompatibilityLevel: 2
stripEngineCode: 1
iPhoneStrippingLevel: 0
iPhoneScriptCallOptimization: 0
iPhoneBuildNumber: 0
ForceInternetPermission: 0
ForceSDCardPermission: 0
CreateWallpaper: 0
APKExpansionFiles: 0
preloadShaders: 0
StripUnusedMeshComponents: 0
VertexChannelCompressionMask:
serializedVersion: 2
m_Bits: 238
iPhoneSdkVersion: 988
iPhoneTargetOSVersion: 22
uIPrerenderedIcon: 0
@@ -137,15 +117,6 @@ PlayerSettings:
iOSLaunchScreenFillPct: 100
iOSLaunchScreenSize: 100
iOSLaunchScreenCustomXibPath:
iOSLaunchScreeniPadType: 0
iOSLaunchScreeniPadImage: {fileID: 0}
iOSLaunchScreeniPadBackgroundColor:
serializedVersion: 2
rgba: 0
iOSLaunchScreeniPadFillPct: 100
iOSLaunchScreeniPadSize: 100
iOSLaunchScreeniPadCustomXibPath:
iOSDeviceRequirements: []
AndroidTargetDevice: 0
AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0}
@@ -165,23 +136,6 @@ PlayerSettings:
m_BuildTargetGraphicsAPIs: []
webPlayerTemplate: APPLICATION:Default
m_TemplateCustomTags: {}
wiiUTitleID: 0005000011000000
wiiUGroupID: 00010000
wiiUCommonSaveSize: 4096
wiiUAccountSaveSize: 2048
wiiUOlvAccessKey: 0
wiiUTinCode: 0
wiiUJoinGameId: 0
wiiUJoinGameModeMask: 0000000000000000
wiiUCommonBossSize: 0
wiiUAccountBossSize: 0
wiiUAddOnUniqueIDs: []
wiiUMainThreadStackSize: 3072
wiiULoaderThreadStackSize: 1024
wiiUSystemHeapSize: 128
wiiUTVStartupScreen: {fileID: 0}
wiiUGamePadStartupScreen: {fileID: 0}
wiiUProfilerLibPath:
actionOnDotNetUnhandledException: 1
enableInternalProfiler: 0
logObjCUncaughtExceptions: 1
@@ -232,35 +186,22 @@ PlayerSettings:
ps4BackgroundImagePath:
ps4StartupImagePath:
ps4SaveDataImagePath:
ps4SdkOverride:
ps4BGMPath:
ps4ShareFilePath:
ps4ShareOverlayImagePath:
ps4PrivacyGuardImagePath:
ps4NPtitleDatPath:
ps4RemotePlayKeyAssignment: -1
ps4RemotePlayKeyMappingDir:
ps4EnterButtonAssignment: 1
ps4ApplicationParam1: 0
ps4ApplicationParam2: 0
ps4ApplicationParam3: 0
ps4ApplicationParam4: 0
ps4DownloadDataSize: 0
ps4GarlicHeapSize: 2048
ps4Passcode: 3mJ7tLHOsT9jNvqC8LNjpnotcWDQLy4O
ps4pnSessions: 1
ps4pnPresence: 1
ps4pnFriends: 1
ps4pnGameCustomData: 1
playerPrefsSupport: 0
ps4ReprojectionSupport: 0
ps4UseAudio3dBackend: 0
ps4Audio3dVirtualSpeakerCount: 14
ps4attribUserManagement: 0
ps4attribMoveSupport: 0
ps4attrib3DSupport: 0
ps4attribShareSupport: 0
ps4IncludedModules: []
monoEnv:
psp2Splashimage: {fileID: 0}
psp2NPTrophyPackPath:
@@ -309,6 +250,7 @@ PlayerSettings:
psp2InfoBarOnStartup: 0
psp2InfoBarColor: 0
psmSplashimage: {fileID: 0}
virtualRealitySupported: 0
spritePackerPolicy:
scriptingDefineSymbols: {}
metroPackageName: GameJamProject
@@ -400,17 +342,6 @@ PlayerSettings:
tizenSigningProfileName:
tizenGPSPermissions: 0
tizenMicrophonePermissions: 0
n3dsUseExtSaveData: 0
n3dsCompressStaticMem: 1
n3dsExtSaveDataNumber: 0x12345
n3dsStackSize: 131072
n3dsTargetPlatform: 2
n3dsRegion: 7
n3dsMediaSize: 0
n3dsLogoStyle: 3
n3dsTitle: GameName
n3dsProductCode:
n3dsApplicationId: 0xFF3FF
stvDeviceAddress:
stvProductDescription:
stvProductAuthor:
@@ -476,6 +407,7 @@ PlayerSettings:
additionalIl2CppArgs::additionalIl2CppArgs:
firstStreamedSceneWithResources: 0
cloudProjectId:
projectId:
projectName:
organizationId:
cloudEnabled: 0

Large diffs are not rendered by default.

@@ -1,2 +1,6 @@
<<<<<<< Updated upstream
m_EditorVersion: 5.2.2f1
=======
m_EditorVersion: 5.1.0f3
>>>>>>> Stashed changes
m_StandardAssetsVersion: 0
@@ -0,0 +1,6 @@
<<<<<<< Updated upstream
m_EditorVersion: 5.2.2f1
=======
m_EditorVersion: 5.1.0f3
>>>>>>> Stashed changes
m_StandardAssetsVersion: 0