// Start is called before the first frame update void Awake() { allRobotStats = FindObjectOfType <AllRobotStats>(); if (buildSampleBots) { BuildSampleRobots(); } }
// Start is called before the first frame update void Start() { handler = transform.parent.gameObject.GetComponent <PartHandler>(); health = maxHealth; initialColor = GetComponent <Renderer>().material.color; rb = transform.parent.gameObject.GetComponent <Rigidbody>(); allRobotStats = FindObjectOfType <AllRobotStats>(); dead = false; }
void Start() { killed = false; rotationOffset = Quaternion.Euler(UnityEngine.Random.Range(-25f, 25f), 0f, 0f); rigidBody = gameObject.GetComponent <Rigidbody>(); handler = gameObject.GetComponent <PartHandler>(); allRobotStats = FindObjectOfType <AllRobotStats>(); if (ActivateOnStart) { Activate(); } }