示例#1
0
        public void Setup()
        {
            _repository    = new Mock <IRepository <Spy> >();
            _spyController = new SpyController(_repository.Object);

            _repository.Setup(r => r.Get()).Returns(new List <Spy>
            {
                new Spy {
                    Id = 1, Name = "James Bond", CodeName = "007"
                },
                new Spy {
                    Id = 2, Name = "Ethan Hunt", CodeName = "314"
                },
                new Spy {
                    Id = 3, Name = "Clouseau", CodeName = "Not now Kato"
                }
            });
        }
示例#2
0
 private void Awake()
 {
     m_spyController = m_spyControllerObj.GetComponent <SpyController>();
 }
示例#3
0
 private void Awake()
 {
     gameObject.GetComponent <SpriteRenderer>().enabled = false;
     m_spycontroller = m_spyControllerObj.GetComponent <SpyController>();
     m_camController = m_CGCamObj.GetComponent <CameraControl>();
 }