Exemple #1
0
 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);
 }
Exemple #3
0
    // 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>();
 }
Exemple #5
0
 private void Awake()
 {
     spaceMovement   = gameObject.GetComponent <SpaceMovement>();
     planetMovement  = gameObject.GetComponent <PlanetMovement>();
     currentMovement = spaceMovement;
     locationHandler = GetComponent <LocationHandler>();
     shoot           = gameObject.GetComponent <Shoot>();
     minChargeTime   = 1.0f;
 }
Exemple #6
0
    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;
    }
Exemple #7
0
 void Start()
 {
     playerMovement = GetComponent <PlanetMovement>();
     controller     = GetComponent <PlayerController>();
     playerUI       = FindObjectOfType <PlayerUI>();
 }
Exemple #8
0
 void Awake()
 {
     health   = GetComponentInChildren <Player_HealthController>();
     movement = GetComponent <PlanetMovement>();
 }