Esempio n. 1
0
        public override void OnStart()
        {
            m_partyScript = GetComponent <PartyScript>();
            m_party       = m_partyScript.GetParty();

            m_enemyScript = enemy.Value.GetComponent <PartyScript>();
            m_enemyParty  = m_enemyScript.GetParty();
        }
Esempio n. 2
0
        public override void OnStart()
        {
            m_partyScript = GetComponent <PartyScript>();
            m_aiManager   = GetComponent <AIManager>();

            strongestEnemy = null;

            m_partyScript.TeleportToLocationOwned();
        }
Esempio n. 3
0
        public void Awake()
        {
            m_agent    = GetComponent <NavMeshAgent>();
            m_tree     = GetComponent <BehaviorTree>();
            m_animator = GetComponent <Animator>();
            m_script   = GetComponent <PartyScript>();

            m_party        = m_script.GetParty();
            strongestEnemy = null;
        }
Esempio n. 4
0
        public override void OnStart()
        {
            m_aiManager = GetComponent <AIManager>();
            m_animator  = GetComponent <Animator>();
            m_agent     = GetComponent <NavMeshAgent>();

            m_partyScript = GetComponent <PartyScript>();
            m_enemyScript = enemy.Value.GetComponent <PartyScript>();

            m_party      = m_partyScript.GetParty();
            m_enemyParty = m_enemyScript.GetParty();
        }
Esempio n. 5
0
        void SpawnBandit()
        {
            Party      party         = ScriptableObject.CreateInstance <Party>();
            GameObject spawnedObject = Instantiate(partyPrefab, RandomPositionOnNavMesh(), transform.rotation);

            spawnedObject.transform.parent = transform;
            PartyScript        partyScript = spawnedObject.GetComponent <PartyScript>();
            PartyUIInteraction partyUI     = spawnedObject.GetComponent <PartyUIInteraction>();

            m_patrolTree = spawnedObject.GetComponent <BehaviorTree>();


            party.IsBandit = true;
            party.Leader   = banditCharacter;
            party.script   = partyScript;

            partyScript.SetParty(party);
            Debug.Log("Ready to enable");
            partyScript.enabled = true;

            partyUI.partyData = party;
            partyUI.enabled   = true;

            if (party.Troops == null)
            {
                party.Troops = new List <Troop>();
            }

            int randomSize = Random.Range(5, 20);

            party.Limit = 999;
            partyScript.AddCharacterToParty(party.Leader, randomSize);
            m_patrolTree.SetVariableValue("spawnPoint", transform.position);

            m_currentBanditCount++;
        }
 public override void OnAwake()
 {
     m_partyScript = GetComponent <PartyScript>();
 }