Пример #1
0
 // <summary>
 /// 初始化关卡环境
 /// </summary>
 public void InitEnvironment(LevelEnvironment environment)
 {
     for (int i = 0; i < m_areas.Length; i++)
     {
         m_areas[i].InitEnvironment(environment);
     }
 }
Пример #2
0
        /// <summary>
        /// 初始化区域环境
        /// </summary>
        /// <param name="environment"></param>
        public void InitEnvironment(LevelEnvironment environment)
        {
            // 地面
            ground.InitEnvironment(environment);

            // 加载门
            for (int i = 0; i < doors.Count; i++)
            {
                doors[i].LoadDoor();
            }

            // 门初始化的时候为关闭
            SetDoorState(LevelDoorState.Close);
        }
Пример #3
0
        /// <summary>
        /// 初始化环境
        /// </summary>
        /// <param name="environment">环境</param>
        public void InitEnvironment(LevelEnvironment environment)
        {
            m_environment = environment;

            // 加载格子
            using (m_gridEnumerator = m_map.GetEnumerator())
            {
                while (m_gridEnumerator.MoveNext())
                {
                    var isShow = !environment.animationEnabled;
                    m_gridEnumerator.Current.Value.LoadAsset(isShow);
                }
            }

            m_area.OnLoadedArea();

            if (environment.animationEnabled)
            {
                PlayAnimation();
            }
        }