Exemplo n.º 1
0
 // Start is called before the first frame update
 void Awake()
 {
     allRobotStats = FindObjectOfType <AllRobotStats>();
     if (buildSampleBots)
     {
         BuildSampleRobots();
     }
 }
Exemplo n.º 2
0
 // 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;
 }
Exemplo n.º 3
0
 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();
     }
 }