前言
本文由作者@zx一路飞奔出品,转载请注明出处
文章地址:http://blog.youkuaiyun.com/u014735301/article/details/42705443作者微博:http://weibo.com/u/1847349851
怪物生成
(1)刷新点
使用粒子系统,在地图上创建刷新点
使用PoolManager插件,创建对象池
using UnityEngine;
using System.Collections;
using PathologicalGames;
public class Spawn : MonoBehaviour {
public GameObject enemyPrefab;
public float spawnTime = 3;
//对象池
SpawnPool spawnPool;
void Start() {
spawnPool = PoolManager.Pools["Spawn"];
InvokeRepeating("SpawnEnemy", 2, spawnTime);
}
vo