You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
600 B
25 lines
600 B
using System; |
|
using UnityEngine; |
|
|
|
namespace Tools.PoolModule1.Sample |
|
{ |
|
public class Player : MonoBehaviour |
|
{ |
|
public SimpleObjectPooler SimplePooler; |
|
|
|
private void Update() |
|
{ |
|
if (Input.GetKeyDown(KeyCode.A)) |
|
{ |
|
// var bullet = SimpleObjectPooler.Instance.GetPooledGameObject(); |
|
// bullet.SetActive(true); |
|
} |
|
|
|
if (Input.GetKeyDown(KeyCode.S)) |
|
{ |
|
var bullet =SimplePooler.GetPooledGameObject(); |
|
bullet.SetActive(true); |
|
} |
|
} |
|
} |
|
} |