private void Awake() { thisAnimator = gameObject.GetComponent <Animator>(); partManager = gameManager.partManager; //partCreator = gameManager.partCreator; coreParent = gameManager.partCreator.coreParent; coreAnimator = coreParent.GetComponent <Animator>(); }
// Start is called before the first frame update void Awake() { thisAnimator = gameObject.GetComponent <Animator>(); partManager = gameManager.partManager; partCreator = gameManager.partCreator; crateManager = gameManager.crateManager; partParentLocation = gameManager.partParentLocation; partParent = gameManager.partCreator.partParent; }
public void Initalise() { materialRef = gameObject.transform.GetChild(0).GetComponent <Renderer>().material; //colorMeter = materialRef.GetFloat("colorMeter"); //shadowMeter = materialRef.GetFloat("shadowMeter"); //weird script reference setting GameObject gameManagerObject = GameObject.Find("GameManager"); globalPartManager = gameManagerObject.GetComponent <Part_Manager>(); var gameManager = gameManagerObject.GetComponent <Game_Manager>(); socketLaser = gameManager.socketLaser; //grab these from the GameManager rotateSpeed = gameManager.rotateSpeed; moveSpeed = gameManager.moveSpeed; coreParent = gameManager.partCreator.coreParent; thisScript = gameObject.GetComponent <Local_Part_Manager>(); myHand = gameManagerObject.GetComponent <Game_Manager>().myHand; localRigidBody = gameObject.GetComponent <Rigidbody>(); //grabs the parent when initalised, the part parent object. origParent = transform.parent; //sets the length of socketOccupied socketOccupied = new bool[socketList.Count]; //turn off the socket colliders if (shape != Shape.corePart00 || shape != Shape.corePart01) { SocketToggle(false); } else { masterBlueprintReference = globalPartManager.masterBlueprint[0]; } childObjects = new GameObject[socketList.Count]; }
// Start is called before the first frame update void Awake() { partManager = gameManagerObject.GetComponent <Part_Manager>(); }
public void Awake() { partManager = gameManager.partManager; leverScript = gameManager.leverScript; }