Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        CameraPos = this.transform.position;

        enemyTime  = 0;
        enemyCount = 1;

        stageList = new List <Stage>();
        wallList  = new List <Wall>();

        CreateStage cs = this.GetComponent <CreateStage>();

        cs.Create(new Vector3(-1, 0, 1), ROOM_NUM);

        f = this.GetComponent <Follow>();

        TargetColor = new Color(0.0f, 1.0f, 0.0f, 0.0f);

        // 作成していたStageを読み取り初期化
        Initilize_Stage();

        //
        Initilize_Wall();

        //
        pm = this.gameObject.GetComponent <ProbabilityMap>();

        ShotEffect.parent = new TokenMgr <ShotEffect>("Exploson", ENEMY_NUM);
    }
Пример #2
0
    public override void OnInspectorGUI()
    {
        Vector3 pos = Vector3.zero;

        //元のInspector部分を表示
        base.OnInspectorGUI();

        //targetを変換して対象を取得
        CreateStage createStage = target as CreateStage;

        //publicMethodを実行する用のボタン
        if (GUILayout.Button("CrateStage"))
        {
            createStage.Create(pos);
        }

        if (GUILayout.Button("DeleteStage"))
        {
            createStage.Delete();
        }
    }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        stageList = new List <Stage>();
        wallList  = new List <Wall>();

        mapList = new List <List <Map> >();
        mapList.Add(new List <Map>());

        stageIDList = new List <List <int> >();
        for (int i = 0; i < ROOM_NUM + 1; i++)
        {
            stageIDList.Add(new List <int>());
        }

        if (SceneManager.GetActiveScene().name != "Select")
        {
            // ステージを自動生成
            CreateStage cs = createStageManager.GetComponent <CreateStage>();
            cs.Create(new Vector3(-1, 0, 1), ROOM_NUM);
        }
        else
        {
            stageCenterPos = Vector3.zero;
            //startPos = new Vector3(-1, -104, -3);
        }



        stageFoundation.transform.position = new Vector3(stageCenterPos.x, -158f, stageCenterPos.z);

        pm = this.GetComponent <ProbabilityMap>();

        TargetColor = new Color(0.0f, 1.0f, 0.0f, 0.0f);

        mainCamera = GameObject.FindGameObjectWithTag("MainCamera");
        mainCamera.transform.position = new Vector3(stageCenterPos.x, 65f, stageCenterPos.z - 30f);
        cameraFollow = mainCamera.GetComponent <Follow>();
        Camera camera = mainCamera.GetComponent <Camera>();


        dp = this.GetComponent <DisplayPurpose>();


        InitilizePlayer(startPos, mainCamera);

        if (SceneManager.GetActiveScene().name != "Select")
        {
            InitilizeHostage(endPos);
            InitilizeDecoy();

            InitilizeEnemy();

            InitilizeStartEffect(startPos, startEffect);
        }
        else
        {
            mainCamera.transform.position = new Vector3(0f, -90f, -5f);
            player.transform.position     = new Vector3(0, -104, 0);

            dp.SetPurposeText("難易度を選ぼう");
        }


        ShotEffect.parent      = new TokenMgr <ShotEffect>("Exploson", ENEMY_NUM);
        ShotStartEffect.parent = new TokenMgr <ShotStartEffect>("Exploson7", ENEMY_NUM);

        hostageFlag = false;

        moveCameraFlag = false;

        dangerUIText  = dangerUI.GetComponentInChildren <Text>();
        cautionUIText = cautionUI.GetComponentInChildren <Text>();

        cautionUI.SetActive(false);
        dangerUI.SetActive(false);
        StartCoroutine("MoveCamera");
    }