mirror of
https://github.com/imperialsushi/gutterball-3.git
synced 2025-06-15 05:07:42 +00:00
New Version 1.42
Moving cam replay. Fixed the bugs. New Version 1.42 Moving cam replay. Fixed the bugs. New Version 1.42 Moving cam replay, Fixed the bugs.
This commit is contained in:
parent
dcb7df5fd1
commit
1c033119df
7079 changed files with 186851 additions and 48991 deletions
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace UnityEditor.PackageManager.UI.Tests
|
||||
{
|
||||
internal class MockAddOperation : MockOperation, IAddOperation
|
||||
{
|
||||
public new event Action<Error> OnOperationError = delegate { };
|
||||
public new event Action OnOperationFinalized = delegate { };
|
||||
public event Action<PackageInfo> OnOperationSuccess = delegate { };
|
||||
|
||||
public PackageInfo PackageInfo { get; set; }
|
||||
|
||||
public MockAddOperation(MockOperationFactory factory, PackageInfo packageInfo = null) : base(factory)
|
||||
{
|
||||
PackageInfo = packageInfo;
|
||||
}
|
||||
|
||||
public void AddPackageAsync(PackageInfo packageInfo, Action<PackageInfo> doneCallbackAction = null,
|
||||
Action<Error> errorCallbackAction = null)
|
||||
{
|
||||
if (ForceError != null)
|
||||
{
|
||||
if (errorCallbackAction != null)
|
||||
errorCallbackAction(ForceError);
|
||||
|
||||
IsCompleted = true;
|
||||
OnOperationError(ForceError);
|
||||
}
|
||||
else
|
||||
{
|
||||
// on add package success, add the package to the list and set it to current
|
||||
var list = Factory.Packages.ToList();
|
||||
list.RemoveAll(p => p.PackageId.ToLower() == packageInfo.PackageId.ToLower());
|
||||
list.Add(packageInfo);
|
||||
Factory.Packages = list;
|
||||
|
||||
Factory.Packages.ByName(packageInfo.Name).SetCurrent(false);
|
||||
packageInfo.IsCurrent = true;
|
||||
|
||||
if (doneCallbackAction != null)
|
||||
doneCallbackAction(PackageInfo);
|
||||
|
||||
IsCompleted = true;
|
||||
OnOperationSuccess(PackageInfo);
|
||||
}
|
||||
|
||||
OnOperationFinalized();
|
||||
}
|
||||
|
||||
internal void ResetEvents()
|
||||
{
|
||||
OnOperationError = delegate { };
|
||||
OnOperationFinalized = delegate { };
|
||||
OnOperationSuccess = delegate { };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e426a33061f184a9785cd5d82f9fb486
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace UnityEditor.PackageManager.UI.Tests
|
||||
{
|
||||
internal class MockListOperation : MockOperation, IListOperation
|
||||
{
|
||||
public new event Action<Error> OnOperationError = delegate { };
|
||||
public new event Action OnOperationFinalized = delegate { };
|
||||
|
||||
public bool OfflineMode { get; set; }
|
||||
|
||||
public MockListOperation(MockOperationFactory factory) : base(factory)
|
||||
{
|
||||
}
|
||||
|
||||
public void GetPackageListAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction,
|
||||
Action<Error> errorCallbackAction = null)
|
||||
{
|
||||
if (ForceError != null)
|
||||
{
|
||||
if (errorCallbackAction != null)
|
||||
errorCallbackAction(ForceError);
|
||||
|
||||
IsCompleted = true;
|
||||
OnOperationError(ForceError);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (doneCallbackAction != null)
|
||||
doneCallbackAction(Factory.Packages);
|
||||
|
||||
IsCompleted = true;
|
||||
}
|
||||
|
||||
OnOperationFinalized();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fea24dc53b50441a9b2a8f9473fede33
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
|
||||
namespace UnityEditor.PackageManager.UI.Tests
|
||||
{
|
||||
internal class MockOperation : IBaseOperation
|
||||
{
|
||||
public event Action<Error> OnOperationError { add { } remove { } }
|
||||
public event Action OnOperationFinalized { add { } remove { } }
|
||||
public event Action<string> OnOperationFailure { add { } remove { } }
|
||||
|
||||
public bool IsCompleted { get; protected set; }
|
||||
public bool RequireNetwork { get; set; }
|
||||
|
||||
public Error ForceError { protected get; set; } // Allow external component to force an error on the requests (eg: testing)
|
||||
|
||||
protected readonly MockOperationFactory Factory;
|
||||
|
||||
protected MockOperation(MockOperationFactory factory)
|
||||
{
|
||||
RequireNetwork = false;
|
||||
Factory = factory;
|
||||
}
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4fc12201ddc4b4d45b9bdecdf7f00ea5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace UnityEditor.PackageManager.UI.Tests
|
||||
{
|
||||
internal class MockRemoveOperation : MockOperation, IRemoveOperation
|
||||
{
|
||||
public new event Action<Error> OnOperationError = delegate { };
|
||||
public new event Action OnOperationFinalized = delegate { };
|
||||
public event Action<PackageInfo> OnOperationSuccess = delegate { };
|
||||
|
||||
public PackageInfo PackageInfo { get; set; }
|
||||
|
||||
public MockRemoveOperation(MockOperationFactory factory) : base(factory)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemovePackageAsync(PackageInfo packageInfo, Action<PackageInfo> doneCallbackAction, Action<Error> errorCallbackAction = null)
|
||||
{
|
||||
if (ForceError != null)
|
||||
{
|
||||
if (errorCallbackAction != null)
|
||||
errorCallbackAction(ForceError);
|
||||
|
||||
IsCompleted = true;
|
||||
OnOperationError(ForceError);
|
||||
OnOperationFinalized();
|
||||
return;
|
||||
}
|
||||
|
||||
Factory.Packages = (from package in Factory.Packages
|
||||
where package.PackageId.ToLower() != packageInfo.PackageId.ToLower()
|
||||
select package);
|
||||
|
||||
if (doneCallbackAction != null)
|
||||
doneCallbackAction(packageInfo);
|
||||
|
||||
IsCompleted = true;
|
||||
OnOperationSuccess(packageInfo);
|
||||
OnOperationFinalized();
|
||||
}
|
||||
|
||||
internal void ResetEvents()
|
||||
{
|
||||
OnOperationError = delegate { };
|
||||
OnOperationFinalized = delegate { };
|
||||
OnOperationSuccess = delegate { };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fd382b8abbd6145c29e32af0e2a26d88
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace UnityEditor.PackageManager.UI.Tests
|
||||
{
|
||||
internal class MockSearchOperation : MockOperation, ISearchOperation
|
||||
{
|
||||
public new event Action<Error> OnOperationError = delegate { };
|
||||
public new event Action OnOperationFinalized = delegate { };
|
||||
|
||||
public IEnumerable<PackageInfo> Packages { get; set; }
|
||||
|
||||
public MockSearchOperation(MockOperationFactory factory, IEnumerable<PackageInfo> packages) : base(factory)
|
||||
{
|
||||
Packages = packages;
|
||||
}
|
||||
|
||||
public void GetAllPackageAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction = null, Action<Error> errorCallbackAction = null)
|
||||
{
|
||||
if (ForceError != null)
|
||||
{
|
||||
if (errorCallbackAction != null)
|
||||
errorCallbackAction(ForceError);
|
||||
IsCompleted = true;
|
||||
OnOperationError(ForceError);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (doneCallbackAction != null)
|
||||
doneCallbackAction(Packages);
|
||||
|
||||
IsCompleted = true;
|
||||
}
|
||||
|
||||
OnOperationFinalized();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0a2c7bcbdfe0a438999cb0653789cdf4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue