Inheritance: MonoBehaviour
Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     time        = 0;
     realtime    = 0;
     flymovement = player.GetComponent <FlyMovement> ();
     rb          = player.GetComponent <Rigidbody> ();
 }
Ejemplo n.º 2
0
    void Start()
    {
        Debug.Log("Collision script added to: " + gameObject.name);

        //intialize all variables
        collision        = false;
        rb               = GetComponent <Rigidbody> ();
        anim             = GetComponent <Animation> ();
        flyMovement      = GetComponent <FlyMovement> ();
        gameOver.enabled = false;

        skinnedMeshRenderer          = GetComponentInChildren <SkinnedMeshRenderer>();
        achievement_Pressure.enabled = false;
        achievement_Wipeout.enabled  = false;
        ispause     = false;
        isSaved     = false;
        lifeManager = GetComponent <LifeManager> ();
        invincible  = false;

        pressure = false;
        wipeout  = false;

        hitTime = 0;
        life    = 3;
        source  = GetComponent <AudioSource>();
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        fly        = owl.GetComponent <FlyMovement> ();
        axe        = GetComponentInChildren <Axe> ();
        huntermove = GetComponent <HunterMovement> ();

        disable();
    }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     flymovement = GetComponent <FlyMovement> ();
     mailcount   = GetComponent <MailCount> ();
     collision   = GetComponent <Collision> ();
     rb          = GetComponent <Rigidbody> ();
     anim        = GetComponent <Animation> ();
     radar       = radarCam.GetComponent <Radar> ();
     started     = false;
     beforeStart();
 }
Ejemplo n.º 5
0
    private void ComponentSetup()
    {
        flyMovement = GetComponent<FlyMovement>();
        anim = GetComponent<Animator>();
        audioSources = GetComponents<AudioSource>();
        Debug.Assert(audioSources[0] != null);
        Debug.Assert(audioSources[1] != null);
        audioSources[0].clip = buzzingSound;
        audioSources[1].clip = deathSound;

        spriteRenderer = GetComponent<SpriteRenderer>();
        startingSprite = spriteRenderer.sprite;
        rb = GetComponent<Rigidbody2D>();
    }
Ejemplo n.º 6
0
    private void ComponentSetup()
    {
        flyMovement  = GetComponent <FlyMovement>();
        anim         = GetComponent <Animator>();
        audioSources = GetComponents <AudioSource>();
        Debug.Assert(audioSources[0] != null);
        Debug.Assert(audioSources[1] != null);
        audioSources[0].clip = buzzingSound;
        audioSources[1].clip = deathSound;

        enemyManager   = GetComponentInParent <EnemyManager>();
        spriteRenderer = GetComponent <SpriteRenderer>();
        startingSprite = spriteRenderer.sprite;
        rb             = GetComponent <Rigidbody2D>();
        wasPaused      = GameManager.Instance.paused;
    }
Ejemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     flyHealth = fly.GetComponent <FlyMovement>();
     health    = GetComponent <Text>();
 }
Ejemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     flyStamina = fly.GetComponent <FlyMovement>();
     stamina    = GetComponent <Text>();
 }