Пример #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        instance     = this;
        mapstart     = 0;
        cameraposx   = mapstart;
        waitcount    = 0;
        frontPos     = cameraposx;
        easingT      = 0;
        pullcount    = 0;
        anothertouch = false;

        mapend = -backLight.GetComponent <SpriteRenderer>().bounds.size.x;
    }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     instance      = this;
     mapstart      = 0;
     cameraposx    = DataManager.Instance.CameraPos.x;
     waitcount     = 0;
     frontPos      = cameraposx;
     easingT       = 0;
     pullcount     = 0;
     anothertouch  = false;
     unitTouchMove = false;
     mapend        = -2.5f * backLight.GetComponent <SpriteRenderer>().bounds.size.x;
 }
Пример #4
0
        public void CreateNewCamera()
        {
            var device = DeviceFactory.CreateDevice("NewCamera", "my new camera");
            var camera = new NewCamera("my new camera", new NewCameraCommChannel());

            //check name
            Assert.Equal(camera.Name, device.Name);
            //check type
            Assert.Equal(camera.GetType(), device.GetType());
            //check status
            Assert.Equal(camera.CheckStatus(), device.CheckStatus());
            //check Connection
            Assert.Equal(camera.CheckConnection(), device.CheckConnection());
        }