Beispiel #1
0
    // Use this for initialization
    void Awake()
    {
        this.character = new DynamicCharacter(characterAvatar);
        var clusterGraph = Resources.Load <ClusterGraph>("ClusterGraph");

        this.draw             = false;
        this.navMesh          = NavigationManager.Instance.NavMeshGraphs[0];
        this.AStarPathFinding = new NodeArrayAStarPathFinding(NavigationManager.Instance.NavMeshGraphs[0], new GatewayHeuristic(clusterGraph));
        this.AStarPathFinding.NodesPerSearch = 100;
        this.path = new DynamicFollowPath();
    }
Beispiel #2
0
 // Use this for initialization
 void Awake()
 {
     this.currentClickNumber = 1;
     this.Initialize(NavigationManager.Instance.NavMeshGraphs[0], new NodeArrayAStarPathFinding(NavigationManager.Instance.NavMeshGraphs[0], new GatewayHeuristic()));
     //this.Initialize(NavigationManager.Instance.NavMeshGraphs[0], new AStarPathfinding(NavigationManager.Instance.NavMeshGraphs[0], new SimpleUnorderedNodeList(), new ClosedDict(), new EuclideanHeuristic()));
     this.character         = new DynamicCharacter(this.gameObject);
     this.dynamicFollowPath = new DynamicFollowPath
     {
         Character       = this.character.KinematicData,
         Target          = new KinematicData(),
         MaxAcceleration = 90.0f
     };
 }
        public HumanActuator(DynamicCharacter character)
        {
            SeekMovement = new DynamicSeek
            {
                MaxAcceleration = 60f,
                Character       = character.KinematicData,
                StopRadius      = 49f // 49 = 7^2
            };

            this.Character          = character;
            this.Character.MaxSpeed = 30f;

            FollowPathMovement = new DynamicFollowPath(character.KinematicData)
            {
                MaxAcceleration = 40f,
                MaxSpeed        = 30f,
                SlowRadius      = 3.5f,
                StopRadius      = 3f,
                GoalPosition    = GoalPosition
            };
        }