Ejemplo n.º 1
0
    public void SetPathing(PathingMode mode)
    {
        Mode = mode;
        switch (mode)
        {
        case PathingMode.Static:
            PositionAnimator.enabled = false;
            break;

        case PathingMode.Wander:
            PositionAnimator.enabled = true;
            PositionAnimator.speed   = Random.Range(0.8f, 1.2f);
            break;
        }
    }
Ejemplo n.º 2
0
        public Nitchify(string rootFolder, PathingMode pathing = PathingMode.Relative)
        {
            //
            // Validation input parameters - rootFolder path is required and must exist
            //

            if (String.IsNullOrEmpty(rootFolder))
            {
                throw new ArgumentNullException(paramName: "rootFolder", message: "'rootFolder' must not be null.");
            }

            if (!Directory.Exists(rootFolder))
            {
                throw new Exception($"No foot folder found at location: {rootFolder}");
            }

            //
            // Set intial parameter values
            //

            this._rootFolder = rootFolder;
            this.Pathing     = pathing;
            this._logger     = new Log(true);
        }
Ejemplo n.º 3
0
 private void Awake()
 {
     Mode = PositionAnimator.enabled ? PathingMode.Wander : PathingMode.Static;
 }