Ejemplo n.º 1
0
        private void DrawPath(Vector3 pos)
        {
            FlightPathItem item = CreateFlightPathItem();

            item.lineEnd.transform.position = new Vector3(pos.x, pos.y + 10, pos.z);
            //item.lineEnd.transform.position = pos;
            //item.GetComponent<LineRenderer>().SetPosition(0, CSimulationManager.instance.m_ballTemplate.transform.position);
            //item.GetComponent<LineRenderer>().SetPosition(1,pos);
            _FlightPathItems.Add(item);
        }
Ejemplo n.º 2
0
        protected override void Release()
        {
            FlightPathItem flightPathItem = (FlightPathItem)Target;

            if (flightPathItem == null)
            {
                return;
            }

            Object.Destroy(flightPathItem.gameObject);
        }
Ejemplo n.º 3
0
        private FlightPathItem CreateFlightPathItem()
        {
            FlightPathItem   pathItem         = null;
            FlightPathObject flightPathObject = _FlightPathObjectPool.Spawn();

            if (flightPathObject != null)
            {
                pathItem = (FlightPathItem)flightPathObject.Target;
            }
            else
            {
                pathItem = Instantiate(_FlightPathItemTemplate);
                _FlightPathObjectPool.Register(new FlightPathObject(pathItem), true);
            }

            return(pathItem);
        }