Example #1
0
    //void Awake ()
    //{
    //	//スタート位置を生成
    //	railPos = cellPoint [UnityEngine.Random.Range (cellPoint.GetLength (0) - 1, 0), UnityEngine.Random.Range (0, cellPoint.GetLength (1) - 1)];
    //	mapData.Add (railPos);
    //	param = mapData [mapData.Count - 1];

    //	//cellPointのIndexを取得するためのリストに値を入れる
    //	for (int i = 0; i <= cellPoint.GetLength (0) - 1; i++) {
    //		for (int j = 0; j <= cellPoint.GetLength (1) - 1; j++) {
    //			xIndex.Add (i);
    //			zIndex.Add (j);
    //		}
    //	}

    //	//mapDataにデータを格納
    //	for (int i = 1; i <= maxRail - 1; i++) {
    //		railPos = randomMaker (zIndex, xIndex);
    //		mapData.Add (railPos);
    //		param = mapData [mapData.Count - 2];
    //	}
    //}

    private void Start()
    {
        stageMake = this.GetComponent <StageMake>();
        maxRail   = stageMake.maxRail;
        cellPoint = stageMake.cellPoint;
        cellindex = new Vector3[cellPoint.Length];
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        obj          = GameObject.Find("Player_Pack(Clone)");
        passingJudge = gameObject.GetComponent <PassingJudge>();
        GameObject playerController = GameObject.Find("PlayerController");
        var        playerVector     = playerController.GetComponent <PlayerVector>();

        playerRunning = obj.GetComponent <PlayerRunning>();

        player = GameObject.Find("Player_Pack(Clone)/Player");

        var stageController = GameObject.Find("StageController");

        stageMake     = stageController.GetComponent <StageMake>();
        startComplete = stageController.GetComponent <StartComplete>();
        button        = stageController.GetComponent <ButtonStatus>();
        playerStatus  = this.GetComponent <PlayerStatus>();

        passingJudge.PlayerNextVector
        .SkipLatestValueOnSubscribe()
        .Delay(TimeSpan.FromSeconds(0.2f))
        .Subscribe(x => StartCoroutine(CheckNextVector()));

        //this.ObserveEveryValueChanged(_ => passingJudge.ColliderCount)
        //.Where(x => x == stageMake.maxRail - 3)
        //.Subscribe(_ =>
        //{
        //playerStatus.playerStateSubject
        //                            .OnNext(PlayerStatus.PlayerState.Idle);
        //playerStatus.playerStateSubject.OnCompleted();
        //}
        //);
    }
Example #3
0
    //private PassingJudge passingJudge;

    // Use this for initialization
    void Start()
    {
        obj             = GameObject.Find("Player_Pack(Clone)");
        stageController = GameObject.Find("StageController");
        stageMake       = stageController.GetComponent <StageMake>();
        maxRail         = stageMake.maxRail;
        //passingJudge = obj.GetComponent<PassingJudge>();
    }
Example #4
0
    IEnumerator GetInstance()
    {
        designer       = stageController.GetComponent <Designer>();
        stageMake      = stageController.GetComponent <StageMake>();
        mapData        = designer.mapData;
        stageRail      = stageMake.stageRail;
        roadController = stageController.GetComponent <RoadController>();

        startComplete.startSubject.OnNext(5);

        yield return(null);
    }
Example #5
0
    private void Start()
    {
        var stageController = GameObject.Find("StageController");

        designer        = stageController.GetComponent <Designer>();
        stageMake       = stageController.GetComponent <StageMake>();
        maxRail         = stageMake.maxRail;
        enemyController = GameObject.Find("EnemyController");
        enemyClass      = enemyController.GetComponent <EnemyController>();

        ColliderCount = 1;
    }
Example #6
0
    void Start()
    {
        designer  = this.GetComponent <Designer>();
        stageMake = this.GetComponent <StageMake>();
        mapData   = designer.mapData;
        maxRail   = stageMake.maxRail;
        cellPoint = stageMake.cellPoint;
        xIndex    = designer.xIndex;
        zIndex    = designer.zIndex;


        //RoadAdd();
    }
Example #7
0
    // Use this for initialization
    void Start()
    {
        var stageController = GameObject.Find("StageController");

        stageMake = stageController.GetComponent <StageMake>();
        designer  = stageController.GetComponent <Designer>();
        maxRail   = stageMake.maxRail;
        mapData   = designer.mapData;
        mapSize   = this.GetComponent <MapSize>();

        CheckFirstOrEnd();

        mapSize.getInstance
        .Where(x => x == 1)
        .Subscribe(_ => CheckLastSpart());
    }
Example #8
0
    private void Start()
    {
        var playerController = GameObject.Find("PlayerController");

        playerControll = playerController.GetComponent <PlayerController>();
        designer       = this.GetComponent <Designer>();
        stageMake      = this.GetComponent <StageMake>();
        roadMaker      = this.GetComponent <RoadMaker>();
        startComplete  = this.GetComponent <StartComplete>();
        cellPoint      = stageMake.cellPoint;
        mapData        = designer.mapData;
        maxRail        = stageMake.maxRail;

        Observable.FromCoroutine(FirstCoroutine)
        .SelectMany(SecondCoroutine)
        .SelectMany(ThirdCoroutine)
        .Subscribe(_ => StartCoroutine(ThirdCoroutine()));
    }
Example #9
0
    // Use this for initialization
    void Start()
    {
        // TODO: あとで直す
        foreach (PassingExit_V2 passingExit_V2 in passingExit_V2List)
        {
            passingExit_V2.exit
            .Distinct(x => x == InOrOut.IN)
            .Distinct(x => x == InOrOut.OUT)
            .Subscribe(_ => TriggerScript());
        }

        stageController = GameObject.Find("StageController");
        roadController  = stageController.GetComponent <RoadController>();
        stageMake       = stageController.GetComponent <StageMake>();
        obj             = GameObject.Find("Player_Pack(Clone)");
        passingJudge    = obj.GetComponent <PassingJudge>();
        playerRunning   = obj.GetComponent <PlayerRunning>();
        playerStatus    = obj.GetComponentInChildren <PlayerStatus>();
    }