示例#1
0
    public override void OnInspectorGUI()
    {
        ObjectPooler pooler = (ObjectPooler)target;


        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Add"))
        {
            pooler.Add();
        }
        if (GUILayout.Button("<--"))
        {
            pooler.Prev();
        }
        if (GUILayout.Button("-->"))
        {
            pooler.Next();
        }
        if (GUILayout.Button("Delete"))
        {
            pooler.Delete();
        }

        GUILayout.EndHorizontal();



        base.OnInspectorGUI();
    }
示例#2
0
    void Start()
    {
        Camera         = Camera.main;
        _skillsManager = GetComponent <SkillsManager>();
        _skillsManager.Init();

        ObjectPooler.Add <Projectile>(bulletPrefab, 50);

        StartCoroutine(ShootingSequence());
    }
示例#3
0
    void Awake()
    {
        ObjectPooler.Add <Enemy>(enemyPrefab);

        StartCoroutine(SpawnRoutine());
    }