Exemple #1
0
    /// <summary>
    ///
    /// </summary>
    public void Init()
    {
        GameObject enemy = Resources.Load <GameObject>("Prefabs/Enemy");

        pool = GameObjectPoolManager.Instance.CreatGameObjectPool <BasePool>("Prefabs/Enemy", enemy);

        enemy = pool.Get(new Vector3(10, 20, 0), 0); //
        pool.Remove(enemy);
        //YaoJing1 yaoJing = enemy.GetComponent<YaoJing1>();
        //yaoJing.MoveEndPoint = new Vector3(-10, -10, 0);
        //yaoJing.MoveSpeed = 0.5f;
        //yaoJing.FireCD = 0.5f;
    }