示例#1
0
        /// <summary>
        /// Call this function in your GameMode's Awake function.
        /// Note this is not an extension method. If it is, the name will be confused.
        /// </summary>
        /// <param name="gameMode"></param>
        public static void Awake(IGameMode gameMode)
        {
            gameMode.SelfInit();
            gameMode.InitPrefabFactory();
            gameMode.SetInitSlot();
            var fieldActors = gameMode.GetActors().ToList();

            fieldActors.ForEach(t => t.SelfInit());
            gameMode.InterInit();
            fieldActors.ForEach(t => t.InterInit());
        }