Esempio n. 1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag(Globals.TAG_PLAYER))
     {
         MiniMapManager.CollidingWithPlayer(roomNumber, roomFloor);
     }
 }
Esempio n. 2
0
    private Vector3 miniMap_Position_Chapter_Street1  = new Vector3(0.39f, 0.77f, -1f);   //0


    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }

        isOpen       = false;
        isZoomOpen   = false;
        isInsideOpen = false;

        arrow   = transform.GetChild(0).gameObject;
        MapName = GameObject.Find("MapName").GetComponent <Text>();

        StreetCameraWhole = GameObject.Find("Street Camera");
        InsideCameraWhole = GameObject.Find("Inside Camera");

        /*초기위치 지부 설정*/
        arrow.transform.localPosition = miniMap_Position_Chapter_Street1;
        MapName.text = "안녕";
        //MoveArrowPosition();

        miniMapUI.SetActive(false);
        StreetUI.SetActive(false);

        /*건물 내부인지 감식 후 적용*/
        CheckMerteInside();
    }
Esempio n. 3
0
 private void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
     ClearTexturesAndRooms();
 }
Esempio n. 4
0
 private void Awake()
 {
     if (Instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Esempio n. 5
0
    private void Awake()
    {
        if (Instance)
        {
            Debug.LogWarning("MiniMapManager already in scene. Deleting myself!");
            Destroy(this);
            return;
        }
        Instance = this;

        //gameObject.SetActive(false);
    }
Esempio n. 6
0
    public override void ApplySettings()
    {
        if (GameObject.FindObjectOfType <MiniMapManager> () == null)
        {
            return;
        }
        GameObject gO = GameObject.FindObjectOfType <MiniMapManager>().gameObject;

        gO.transform.GetChild(0).gameObject.SetActive(enabled);
        gO.transform.GetChild(1).gameObject.SetActive(enabled);
        if (!enabled)
        {
            return;
        }
        MiniMapManager miniMapManagerRef = gO.GetComponent <MiniMapManager>();
        RectTransform  rectTrans         = miniMapManagerRef.miniMapPanel.GetComponent <RectTransform> ();

        rectTrans.anchoredPosition = rectPos;

        miniMapManagerRef.mapProportionOfScreen = mapPortionOfScreen;
        miniMapManagerRef.orthoCamRadiusFeet    = orthoCamRadiusFeet;
        miniMapManagerRef.SetMiniMapCam();
    }
Esempio n. 7
0
    void JoinTeam(string team)
    {
        //subLocalVariables = new SubLocalVariables[10];
        //for (int n = 0; n < subLocalVariables.Length; n++)
        //{
        //    subLocalVariables[n] = new SubLocalVariables();
        //}


        Debug.Log(team);
        //Debug.Log("生成完了");
        //Vector3 pos;
        //位置をずらす度合をランダムに決定
        x = Random.Range(-5f, 5f);
        y = 2f;
        z = Random.Range(-5f, 5f);

        switch (team)
        {
        case "Black":
            //Playerのオブジェクトを生成
            //選択されたキャラのIDに応じて、生成するモデルを変える必要あり IDを入れる変数は宣言済み
            player = (GameObject)PhotonNetwork.Instantiate("CapsulePlayer", GameObject.Find("PlayerSpawnPos1").transform.position, Quaternion.identity, 0);
//                Chara playerChara = player.GetComponent<Chara>();
            chara                     = player.GetComponent <Chara>();
            chara.enabled             = true;
            chara.initTeamColorPlayer = TeamColor.Black;
            teamColorPlayerSave       = TeamColor.Black;
            player.GetComponent <LocalVariables>().team = chara.initTeamColorPlayer;
            chara.objectKind = ObjectKind.Player;
            objectKindSave   = ObjectKind.Player;
            chara.StartSetting();
            //chara.hpBar_OnHead.gameObject.transform.GetChild(1).GetChild(0).GetComponent<Image>().color = Color.red;


            //位置調整
            pos    = GameObject.Find("PlayerSpawnPos1").transform.position;
            pos.x += x;
            pos.z += z;
            player.transform.position = pos;

            //角度調整
            Quaternion angle = GameObject.Find("PlayerSpawnPos1").transform.rotation;
            angle.y = -90;
            player.transform.rotation = angle;

//                projector = GameObject.Find("BlackProjector");

            break;

        case "White":
            //Playerのオブジェクトを生成
            player = (GameObject)PhotonNetwork.Instantiate("CapsulePlayer", GameObject.Find("PlayerSpawnPos1").transform.position, Quaternion.identity, 0);
//                Chara playerCharaa = player.GetComponent<Chara>();
            chara                     = player.GetComponent <Chara>();
            chara.enabled             = true;
            chara.initTeamColorPlayer = TeamColor.White;
            teamColorPlayerSave       = TeamColor.White;
            player.GetComponent <LocalVariables>().team = chara.initTeamColorPlayer;
            chara.objectKind = ObjectKind.Player;
            objectKindSave   = ObjectKind.Player;
            chara.StartSetting();
            //chara.hpBar_OnHead.gameObject.transform.GetChild(1).GetChild(0).GetComponent<Image>().color = Color.blue;

            //位置調整
            pos    = GameObject.Find("PlayerSpawnPos2").transform.position;
            pos.x += x;
            pos.z += z;
            player.transform.position = pos;

//                projector = GameObject.Find("WhiteProjector");
            //スポーン地点2は角度調整が不要
            break;
        }

        whiteProjector  = GameObject.Find("WhiteProjector");
        blackProjector  = GameObject.Find("BlackProjector");
        gameStatePlayer = player.GetComponent <Chara>().gameState;
        MiniMapManager minimapManager = GameObject.Find("MiniMap").GetComponent <MiniMapManager>();

        minimapManager.Player = player.GetComponent <Transform>();
        chara = player.GetComponent <Chara>();

        //roomFlag = true;
    }