コード例 #1
0
ファイル: ScoutSubsystem.cs プロジェクト: RikardGehlin/Exjobb
    IEnumerator Start()
    {
        walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = GeneratePosition();

        yield return StartCoroutine(FindResource());
        Destroy(gameObject);
    }
コード例 #2
0
ファイル: ScoutSubsystem.cs プロジェクト: hengun348/Exjobb
    IEnumerator Start()
    {
        walker         = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = GeneratePosition();

        yield return(StartCoroutine(FindResource()));

        Destroy(gameObject);
    }
コード例 #3
0
 IEnumerator Start()
 {
     walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
     moveToPosition = transform.parent.parent.parent.parent.FindChild("Commanders").position; // new Vector3(0,0,0);//BlackBoard.Instance.GetTaskTree(clan).GetOwnedNode(agentComponent.getAgentNumber()).GetPosition();
     actionIsDone = false;
     yield return StartCoroutine(Migrate());
     Debug.Log("Nu är subrutinen klar, och migratesubsystem tas bort");
     Destroy(gameObject);
 }
コード例 #4
0
    IEnumerator Start()
    {
        walker         = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = transform.parent.parent.parent.parent.FindChild("Commanders").position;         // new Vector3(0,0,0);//BlackBoard.Instance.GetTaskTree(clan).GetOwnedNode(agentComponent.getAgentNumber()).GetPosition();
        actionIsDone   = false;
        yield return(StartCoroutine(Migrate()));

        Debug.Log("Nu är subrutinen klar, och migratesubsystem tas bort");
        Destroy(gameObject);
    }
コード例 #5
0
    IEnumerator Start()
    {
        walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = BlackBoard.Instance.GetTaskTree(clan).GetOwnedNode(agentComponent.getAgentNumber()).GetPosition();
        actionIsDone = false;

        yield return StartCoroutine(Assist());
        Debug.Log("Nu är subrutinen klar, och assistsubsystem tas bort");
        Destroy(gameObject);
    }
コード例 #6
0
    IEnumerator Start()
    {
        walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = BlackBoard.Instance.GetTaskTree(clan).GetOwnedNode(agentComponent.GetAgentNumber()).GetPosition(); //get the position from the agents owned node in the tasktree
        actionIsDone = false;

        yield return StartCoroutine(Assist()); //start a process that runs parallel to the other processes and wait on this line until the process is done
        Debug.Log("Nu är subrutinen klar, och assistsubsystem tas bort");

        Destroy(gameObject); //remove this subsystem
    }
コード例 #7
0
    IEnumerator Start()
    {
        walker         = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = BlackBoard.Instance.GetTaskTree(clan).GetOwnedNode(agentComponent.getAgentNumber()).GetPosition();
        actionIsDone   = false;

        yield return(StartCoroutine(Assist()));

        Debug.Log("Nu är subrutinen klar, och assistsubsystem tas bort");
        Destroy(gameObject);
    }
コード例 #8
0
ファイル: GetSubsystem.cs プロジェクト: hengun348/Exjobb
    IEnumerator Start()
    {
        walker         = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = new Vector3(Random.Range(agentObject.transform.position.x - 20.0f, agentObject.transform.position.x + 20.0f), 0, Random.Range(agentObject.transform.position.z - 20.0f, agentObject.transform.position.z + 20.0f));

        collected    = false;
        actionIsDone = false;
        yield return(StartCoroutine(FindResource()));

        Destroy(gameObject);
    }
コード例 #9
0
    IEnumerator Start()
    {
        walker         = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = BlackBoard.Instance.GetTaskTree(clan).GetOwnedNode(agentComponent.GetAgentNumber()).GetPosition();         //get the position from the agents owned node in the tasktree
        actionIsDone   = false;

        yield return(StartCoroutine(Assist()));        //start a process that runs parallel to the other processes and wait on this line until the process is done

        Debug.Log("Nu är subrutinen klar, och assistsubsystem tas bort");

        Destroy(gameObject);         //remove this subsystem
    }
コード例 #10
0
ファイル: GetSubsystem.cs プロジェクト: hengun348/Exjobb
    IEnumerator Start()
    {
        walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        //TODO: choose the nearest source to go to
        moveToPosition = (Vector3)agentComponent.GetWMemory().GetFact(facts[1])[0].GetFactValue();

        collected    = false;
        actionIsDone = false;
        yield return(StartCoroutine(FindResource()));

        Destroy(gameObject);
    }
コード例 #11
0
ファイル: GetSubsystem.cs プロジェクト: RikardGehlin/Exjobb
    IEnumerator Start()
    {
        walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        //TODO: choose the nearest source to go to
        Debug.Log ("Försöker hitta, i wm, information om: " + facts[1]);
        moveToPosition = (Vector3)agentComponent.GetWMemory().GetFact(facts[1])[0].GetFactValue();

        collected = false;
        actionIsDone = false;
        yield return StartCoroutine(FindResource());
        Destroy(gameObject);
    }
コード例 #12
0
 void Start()
 {
     walker         = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
     moveToPosition = agentObject.transform.position;
     walker.StartWalking(moveToPosition);
 }
コード例 #13
0
ファイル: IdleSubsystem.cs プロジェクト: RikardGehlin/Exjobb
 void Start()
 {
     walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
     moveToPosition = agentObject.transform.position;
     walker.StartWalking(moveToPosition);
 }
コード例 #14
0
ファイル: RestingSubsystem.cs プロジェクト: hengun348/Exjobb
 void Start()
 {
     walker         = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
     moveToPosition = new Vector3(30, 0, 30);
     walker.StartWalking(moveToPosition);
 }
コード例 #15
0
 void Start()
 {
     walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
     moveToPosition = new Vector3(30, 0, 30);
     walker.StartWalking(moveToPosition);
 }
コード例 #16
0
ファイル: GetSubsystem.cs プロジェクト: RikardGehlin/Exjobb
    IEnumerator Start()
    {
        walker = (WalkSubsystem)gameObject.GetComponent("WalkSubsystem");
        moveToPosition = new Vector3(Random.Range(agentObject.transform.position.x - 20.0f, agentObject.transform.position.x + 20.0f), 0, Random.Range(agentObject.transform.position.z - 20.0f, agentObject.transform.position.z + 20.0f));

        collected = false;
        actionIsDone = false;
        yield return StartCoroutine(FindResource());
        Destroy(gameObject);
    }