Ejemplo n.º 1
0
        public void ClearBehaviour()
        {
            _behaviour.OnEndBullet();
            _behaviour = null;

            MeshRenderer.enabled = false;
        }
Ejemplo n.º 2
0
        public void Remove(ThousandBulletBehaviour bulletBehaviour)
        {
            var node = _dictionary[bulletBehaviour];

            _controllers.Remove(node);
            _recycle.Remove(node.Value);
            _dictionary.Remove(bulletBehaviour);
        }
Ejemplo n.º 3
0
        public void SerBehaviour(ThousandBulletBehaviour behaviour)
        {
            _behaviour = behaviour;

            Initialize();

            _behaviour.SetPrefab(this);
            _behaviour.OnStartBullet();

            MeshRenderer.enabled = true;
        }
Ejemplo n.º 4
0
        public void AddBullet(ThousandBulletBehaviour bulletBehaviour, Vector3 position, Quaternion rotation)
        {
            var controller = new BulletRecycleController(bulletBehaviour);

            var obj = _recycle.Instanciate(controller, DefaultPrefab, position, rotation);

            obj.transform.parent = transform;

            var node = _controllers.AddLast(controller);

            _dictionary.Add(bulletBehaviour, node);
        }
Ejemplo n.º 5
0
 public BulletRecycleController(ThousandBulletBehaviour behaviour)
 {
     BulletBehaviour = behaviour;
 }