private void Awake() { if (main == null) { main = this; } else if (main != this) { Destroy(gameObject); } }
public void CommandResource_Verify() { var factory = CommandFactory.Create(); var command = factory.CreateOutputCommand(); var resourceOne = CommandInput.Create(Resource.From(Assets.Utilities.GetVideoFile())); var resourceTwo = CommandInput.Create(Resource.From(Assets.Utilities.GetVideoFile())); var resourceList = new List <CommandInput> { CommandInput.Create(Resource.From(Assets.Utilities.GetVideoFile())), CommandInput.Create(Resource.From(Assets.Utilities.GetVideoFile())) }; var commandResourceManager = CommandInputManager.Create(command); Assert.DoesNotThrow(() => commandResourceManager.Add(resourceOne)); Assert.DoesNotThrow(() => commandResourceManager.AddRange(resourceList)); Assert.DoesNotThrow(() => commandResourceManager.Insert(0, resourceTwo)); Assert.True(command.Inputs.Count == 4); }
void Start() { cim = CommandInputManager.main; }