コード例 #1
0
    void Start()
    {
        boxPositionY = gameObject.transform.position.y;
        boxBoundaryY = -(CameraProp.GetCameraHeight(Camera.main) / 2 - 10f);

        //default
        colorCode = "white";
        speed     = 7f;
        chooser   = 0;
    }    //start
コード例 #2
0
ファイル: ObjectSpawner.cs プロジェクト: ashrafuz/ColorBox
    void Awake()
    {
        screenWidth  = CameraProp.GetCameraWidth(Camera.main);
        screenHeight = CameraProp.GetCameraHeight(Camera.main);

        offsetX = 55f;
        offsetY = 55f;
        rangeX  = screenWidth / 2f - offsetX;
        startY  = screenHeight / 2f + offsetY;

        minTimeWait = 0.4f;
        maxTimeWait = 0.9f;
    }    //awake
コード例 #3
0
ファイル: TrackSpawner.cs プロジェクト: ashrafuz/ColorBox
    void Awake()
    {
        screenWidth  = CameraProp.GetCameraWidth(Camera.main);
        screenHeight = CameraProp.GetCameraHeight(Camera.main);

        rangeX = screenWidth / 2f;
        startY = transform.position.y;

        positionX1 = 0f;
        positionX2 = (rangeX / 2f);
        positionX3 = -positionX2;


        // generate objects
        // if it crosses screen height, deactivate it
    }    //awake