Пример #1
0
 void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Пример #2
0
    //입력된 값을 float로 저장할 변수
    // Use this for initialization
    void Start()
    {
        earthManager = EarthManager.Instance;
        SVManager = StreetViewManager.Instance;

        for (int i = 0; i < EarthManager.panoramas.Count; i++)
        {
            Information info = EarthManager.panoramas[i];

            //추천지역은 타겟의 모양을 다르게
            GameObject pin = Instantiate( info.isFamous ? greatSpotObject : spotObject , transform.position, Quaternion.identity) as GameObject;
            pin.transform.parent = earth.transform;

            StreetViewPoint point = pin.GetComponent<StreetViewPoint>();
            point.SetPosition(info); // 파라미터 2개 추가
            point.info_area = info.area;
            point.info_contents = info.contents;
            point.info_country = info.country;
            point.info_flag_path = info.info_flag_path;
            point.info_title = info.title;

            if (  SVManager.enableAutoImageCache
                && !Utility.FindCachedImageFromID(info.panoid)
                && info.isFamous ) {

                SVManager.IsHotPlace = info.isFamous;
                SVManager.PlaceID = info.panoid;
                Application.LoadLevel("StreetViewer");
            }

        }
    }
Пример #3
0
        public void SetPolution(bool isPoluted)
        {
            bool lPoluted = _poluted;

            _poluted = isPoluted;
            if (lPoluted != isPoluted)
            {
                EarthManager.PoluteCell(_state, isPoluted);
                ChangeColor(isPoluted);
            }
        }
Пример #4
0
 public void HealEathLife()
 {
     m_as = GetComponent <AudioSource>();
     Debug.Log("回復する");
     //音を鳴らす
     if (m_healSound != null)
     {
         m_as.PlayOneShot(m_healSound);
     }
     m_em       = FindObjectOfType <EarthManager>();
     m_em.m_hp += m_healPoint;
 }
Пример #5
0
    //public HighscoreTable _ht;

    private void Awake()
    {
        int highscore = GetHighscore();

        _playerController = Object.FindObjectOfType <PlayerController>().GetComponent <PlayerController>();
        _enemyController  = Object.FindObjectOfType <EnemyController>().GetComponent <EnemyController>();
        _earthManager     = Object.FindObjectOfType <EarthManager>().GetComponent <EarthManager>();
        //_ht = Object.FindObjectOfType<HighscoreTable>().GetComponent<HighscoreTable>();



        Debug.Log("Highscore: " + highscore);
    }
Пример #6
0
 public void ForcePolution(bool state)
 {
     _poluted = state;
     EarthManager.PoluteCell(_state, _poluted);
     ChangeColor(_poluted);
 }
Пример #7
0
 public void HealEathLife(int healPoint)
 {
     Debug.Log("回復する");
     m_em       = GetComponent <EarthManager>();
     m_em.m_hp += healPoint;
 }
Пример #8
0
 void Start()
 {
     _earthManager = Object.FindObjectOfType <EarthManager>().GetComponent <EarthManager>();
     rb            = GetComponent <Rigidbody>();
     gm            = Object.FindObjectOfType <GameManager>().GetComponent <GameManager>();
 }