void Start() { // Get the ground's bounds areaBounds = ground.GetComponent <Collider>().bounds; // Get the ground renderer so we can change the material when a goal is scored m_GroundRenderer = ground.GetComponent <Renderer>(); // Starting material m_GroundMaterial = m_GroundRenderer.material; m_PushBlockSettings = FindObjectOfType <PushBlockSettings>(); // Initialize Blocks foreach (var item in BlocksList) { item.StartingPos = item.T.transform.position; item.StartingRot = item.T.transform.rotation; item.Rb = item.T.GetComponent <Rigidbody>(); } // Initialize TeamManager m_AgentGroup = new SimpleMultiAgentGroup(); foreach (var item in AgentsList) { item.StartingPos = item.Agent.transform.position; item.StartingRot = item.Agent.transform.rotation; item.Rb = item.Agent.GetComponent <Rigidbody>(); m_AgentGroup.RegisterAgent(item.Agent); } ResetScene(); }
public override void Initialize() { m_GameController = GetComponentInParent <DungeonEscapeEnvController>(); m_AgentRb = GetComponent <Rigidbody>(); m_PushBlockSettings = FindObjectOfType <PushBlockSettings>(); MyKey.SetActive(false); IHaveAKey = false; }
void Awake() { m_PushBlockSettings = FindObjectOfType <PushBlockSettings>(); LazyInitializeActions(); // Cache the agent rigidbody m_PlayerRb = GetComponent <Rigidbody>(); }
public override void Initialize() { m_Area = transform.parent.gameObject; m_MaxNumberOfTiles = k_HighestTileValue; m_ResetParams = Academy.Instance.EnvironmentParameters; m_BufferSensor = GetComponent <BufferSensorComponent>(); m_PushBlockSettings = FindObjectOfType <PushBlockSettings>(); m_AgentRb = GetComponent <Rigidbody>(); m_StartingPos = transform.position; }
void Awake() { m_PushBlockSettings = FindObjectOfType <PushBlockSettings>(); goalDetect = block.GetComponent <GoalDetect>(); goalDetect.agent = this; // Cache the agent rigidbody m_AgentRb = GetComponent <Rigidbody>(); // Cache the block rigidbody m_BlockRb = block.GetComponent <Rigidbody>(); // Get the ground's bounds areaBounds = ground.GetComponent <Collider>().bounds; // Get the ground renderer so we can change the material when a goal is scored m_GroundRenderer = ground.GetComponent <Renderer>(); // Starting material m_GroundMaterial = m_GroundRenderer.material; }
void Start() { // Get the ground's bounds areaBounds = ground.GetComponent <Collider>().bounds; // Get the ground renderer so we can change the material when a goal is scored m_GroundRenderer = ground.GetComponent <Renderer>(); // Starting material m_GroundMaterial = m_GroundRenderer.material; m_PushBlockSettings = FindObjectOfType <PushBlockSettings>(); //Reset Players Remaining m_NumberOfRemainingPlayers = AgentsList.Count; //Hide The Key Key.SetActive(false); // Initialize TeamManager m_AgentGroup = new SimpleMultiAgentGroup(); foreach (var item in AgentsList) { item.StartingPos = item.Agent.transform.position; item.StartingRot = item.Agent.transform.rotation; item.Rb = item.Agent.GetComponent <Rigidbody>(); item.Col = item.Agent.GetComponent <Collider>(); // Add to team manager m_AgentGroup.RegisterAgent(item.Agent); } foreach (var item in DragonsList) { item.StartingPos = item.Agent.transform.position; item.StartingRot = item.Agent.transform.rotation; item.T = item.Agent.transform; item.Col = item.Agent.GetComponent <Collider>(); } ResetScene(); }
void Awake() { m_PushBlockSettings = FindObjectOfType <PushBlockSettings>(); }
void Awake() { m_Academy = FindObjectOfType <Academy>(); //cache the academy m_PushBlockSettings = FindObjectOfType <PushBlockSettings>(); }