void Start() { controller = GetComponentInParent <PlayerController>(); movement = GetComponentInParent <PlanetMovement>(); healthController = GetComponentInParent <Player_HealthController>(); controller.SetPlanetProtection(true); }
void Awake() { health = GetComponentInChildren <Player_HealthController>(); movement = GetComponent <PlanetMovement>(); ability = GetComponent <ISpecialAbility>(); Camera.main.GetComponent <CameraFollow>().AddPlayers(gameObject.transform); }
// Update is called once per frame void Update() { textBox.text = intensity.ToString(); inTime += Time.fixedDeltaTime; if (inTime - prec >= 5f) { prec = inTime; if (interSend - 5f > 7f) { interSend -= 5f; } } if (phase == 2 && Input.GetKeyDown(KeyCode.Space)) { foreach (GameObject go in planets) { PlanetMovement pM = go.GetComponent <PlanetMovement>(); pM.go = false; } } if (Input.GetKeyUp(KeyCode.Space) && phase != 3) { foreach (GameObject go in planets) { PlanetMovement pM = go.GetComponent <PlanetMovement>(); pM.go = true; } } }
// Use this for initialization void Start() { groundCheck = transform.Find("GroundCheck").gameObject; planetAdhering = gameObject.GetComponent <AdhereToPlanet>(); normalMovement = gameObject.GetComponent <SpaceMovement>(); planetMovement = gameObject.GetComponent <PlanetMovement>(); hookshot = GameObject.Find("Hook").GetComponent <Hookshot>(); }
private void Awake() { spaceMovement = gameObject.GetComponent <SpaceMovement>(); planetMovement = gameObject.GetComponent <PlanetMovement>(); currentMovement = spaceMovement; locationHandler = GetComponent <LocationHandler>(); shoot = gameObject.GetComponent <Shoot>(); minChargeTime = 1.0f; }
protected override void Start() { base.Start(); playerUI = FindObjectOfType <PlayerUI>(); if (GetComponent <PlayerController>() != null) { playerNumber = GetComponent <PlayerController>().playerNr; } animator = GetComponent <Animator>(); controller = GetComponent <IPlanet>(); planetMovement = GetComponent <PlanetMovement>(); myTransform = GetComponentInChildren <SpriteRenderer>().transform; spawnPoint = transform.position; hat = FindObjectOfType <Hat>(); planetChild = transform.GetChild(0).gameObject; weaponOrbit = transform.GetChild(1).gameObject; }
void Start() { playerMovement = GetComponent <PlanetMovement>(); controller = GetComponent <PlayerController>(); playerUI = FindObjectOfType <PlayerUI>(); }
void Awake() { health = GetComponentInChildren <Player_HealthController>(); movement = GetComponent <PlanetMovement>(); }