Ejemplo n.º 1
0
 private void Awake()
 {
     if (main == null)
     {
         main = this;
     }
     else if (main != this)
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 void Start()
 {
     cim = CommandInputManager.main;
 }