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

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

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

            Initialize();

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

            MeshRenderer.enabled = true;
        }
Esempio 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);
        }
Esempio n. 5
0
 public BulletRecycleController(ThousandBulletBehaviour behaviour)
 {
     BulletBehaviour = behaviour;
 }