Exemplo n.º 1
0
        public Steering GetFreeSteering(ESteeringType type, Body character, SteeringProperties properties, Location target = null)
        {
            if (type == ESteeringType.None)
            {
                return(null);
            }

            Steering steering = (Steering)_pools[(int)type].GetFreeResource();

            steering.Init(character, properties, target);

            return(steering);
        }
Exemplo n.º 2
0
        public void SetProperties(string propertiesName)
        {
            _steeringProperties = SteeringPropertiesTable.instance.GetProperties(propertiesName);

            if (_steeringProperties != null)
            {
                if (_steering)
                {
                    _steering.Init(_body, _steeringProperties, null);
                }
            }
            else
            {
                Debug.LogWarning("Can't find the properties in the table. Verify the name : \"" + propertiesName + "\"");
            }
        }