Пример #1
0
 private void Start()
 {
     theTransform = transform;
     GameObject gO = GameObject.FindWithTag("Player");
     player = gO.transform;
     gun = gO.GetComponentInChildren<Gun>();
     custom = GameObject.FindWithTag("Scripts").GetComponent<CustomPlayClipAtPoint>();
 }
Пример #2
0
    private GameObject beam;                    // A beam that allows the level to be back trackable.

    private void Start()
    {
        theTransform = transform;
        accessLight  = GetComponentInChildren <Light>();
        doorLight    = GameObject.FindWithTag("Exit").GetComponentInChildren <Light>();
        player       = GameObject.FindWithTag("Player").transform;
        custom       = GameObject.FindWithTag("Scripts").GetComponent <CustomPlayClipAtPoint>();
    }
Пример #3
0
 private void Start()
 {
     theTransform = transform;
     accessLight = GetComponentInChildren<Light>();
     doorLight = GameObject.FindWithTag("Exit").GetComponentInChildren<Light>();
     player = GameObject.FindWithTag("Player").transform;
     custom = GameObject.FindWithTag("Scripts").GetComponent<CustomPlayClipAtPoint>();
 }
Пример #4
0
 private void Start()
 {
     theTransform = transform;
     GameObject gO = GameObject.FindWithTag("Player");
     player = gO.transform;
     playerH = gO.GetComponent<PlayerHealth>();
     custom = GameObject.FindWithTag("Scripts").GetComponent<CustomPlayClipAtPoint>();
 }
Пример #5
0
    private Reset reset;                        // Reference tot he Reset class.

    private void Start()
    {
        theTransform = transform;
        GameObject gO = GameObject.FindWithTag("Player");

        player  = gO.transform;
        playerH = gO.GetComponent <PlayerHealth>();
        custom  = GameObject.FindWithTag("Scripts").GetComponent <CustomPlayClipAtPoint>();
    }
Пример #6
0
    private CustomPlayClipAtPoint custom;       // Reference to the CustomPlayClipAtPoint script.

    private void Start()
    {
        theTransform = transform;
        GameObject gO = GameObject.FindWithTag("Player");

        player = gO.transform;
        gun    = gO.GetComponentInChildren <Gun>();
        custom = GameObject.FindWithTag("Scripts").GetComponent <CustomPlayClipAtPoint>();
    }
Пример #7
0
    private CustomPlayClipAtPoint custom;              // Reference to the CustomPlayClipAtPoint script.

    private void Awake()
    {
        theTransform = transform;
        anim         = transform.root.gameObject.GetComponent <Animator>();
        player       = GameObject.FindWithTag("Player").transform;
        playerCtrl   = transform.root.GetComponent <PlayerControl>();
        playerH      = transform.root.GetComponent <PlayerHealth>();
        custom       = GameObject.FindWithTag("Scripts").GetComponent <CustomPlayClipAtPoint>();
        bulletType   = (int)bullets.Pistol;
    }
Пример #8
0
 private void Awake()
 {
     theTransform = transform;
     anim = GetComponent<Animator>();
     GameObject gO  = GameObject.FindWithTag("Player");
     player = gO.transform;
     rigid = GetComponent<Rigidbody2D>();
     playerH = gO.GetComponent<PlayerHealth>();
     custom = GameObject.FindWithTag("Scripts").GetComponent<CustomPlayClipAtPoint>();
 }
Пример #9
0
 private void Awake()
 {
     theTransform = transform;
     anim = transform.root.gameObject.GetComponent<Animator>();
     player = GameObject.FindWithTag("Player").transform;
     playerCtrl = transform.root.GetComponent<PlayerControl>();
     playerH = transform.root.GetComponent<PlayerHealth>();
     custom = GameObject.FindWithTag("Scripts").GetComponent<CustomPlayClipAtPoint>();
     bulletType = (int)bullets.Pistol;
 }
Пример #10
0
    private CustomPlayClipAtPoint custom;       // Reference to the CustomPlayClipAtPoint script.

    private void Awake()
    {
        theTransform = transform;
        anim         = GetComponent <Animator>();
        GameObject gO = GameObject.FindWithTag("Player");

        player  = gO.transform;
        rigid   = GetComponent <Rigidbody2D>();
        playerH = gO.GetComponent <PlayerHealth>();
        custom  = GameObject.FindWithTag("Scripts").GetComponent <CustomPlayClipAtPoint>();
    }
Пример #11
0
 private void Awake()
 {
     theTransform = transform;
     GameObject gO  = GameObject.FindWithTag("Rip");
     ripAnim = gO.GetComponent<Animator>();
     ripSprite = gO.GetComponent<SpriteRenderer>();
     playerCtrl = GetComponent<PlayerControl>();
     anim = GetComponent<Animator>();
     gO = GameObject.FindWithTag("Scripts");
     custom = gO.GetComponent<CustomPlayClipAtPoint>();
     reset = gO.GetComponent<Reset>();
     currentH = HEALTH;
 }
Пример #12
0
    public AudioClip deathClip;                 // Clip for when the player dies.

    private void Awake()
    {
        theTransform = transform;
        GameObject gO = GameObject.FindWithTag("Rip");

        ripAnim    = gO.GetComponent <Animator>();
        ripSprite  = gO.GetComponent <SpriteRenderer>();
        playerCtrl = GetComponent <PlayerControl>();
        anim       = GetComponent <Animator>();
        gO         = GameObject.FindWithTag("Scripts");
        custom     = gO.GetComponent <CustomPlayClipAtPoint>();
        reset      = gO.GetComponent <Reset>();
        currentH   = HEALTH;
    }
Пример #13
0
 private void Awake()
 {
     theTransform = transform;
     GameObject gO  = GameObject.FindWithTag("Player");
     rigid = gO.GetComponent<Rigidbody2D>();
     poly = gO.GetComponent<PolygonCollider2D>();
     playerCtrl = gO.GetComponent<PlayerControl>();
     playerH = gO.GetComponent<PlayerHealth>();
     player = gO.transform;
     anim = GetComponent<Animator>();
     custom = GameObject.FindWithTag("Scripts").GetComponent<CustomPlayClipAtPoint>();
     if (!found && gameObject.name.Equals("beam 1")) {
         found = true;
         anim.SetTrigger("HelpBeam");
     }
 }
Пример #14
0
    private CustomPlayClipAtPoint custom;       // Reference to the CustomPlayClipAtPoint script.

    private void Awake()
    {
        theTransform = transform;
        GameObject gO = GameObject.FindWithTag("Player");

        rigid      = gO.GetComponent <Rigidbody2D>();
        poly       = gO.GetComponent <PolygonCollider2D>();
        playerCtrl = gO.GetComponent <PlayerControl>();
        playerH    = gO.GetComponent <PlayerHealth>();
        player     = gO.transform;
        anim       = GetComponent <Animator>();
        custom     = GameObject.FindWithTag("Scripts").GetComponent <CustomPlayClipAtPoint>();
        if (!found && gameObject.name.Equals("beam 1"))
        {
            found = true;
            anim.SetTrigger("HelpBeam");
        }
    }
Пример #15
0
 private void Awake()
 {
     panels = new GameObject[] {PC1, PC2, Mobile1, Mobile2, controlsPanel, optionsPanel, creditsPanel};
     custom = GameObject.FindWithTag("Scripts").GetComponent<CustomPlayClipAtPoint>();
 }
Пример #16
0
    public GameObject[] panels;                 // Array of the panels initialized above.

    private void Awake()
    {
        panels = new GameObject[] { PC1, PC2, Mobile1, Mobile2, controlsPanel, optionsPanel, creditsPanel };
        custom = GameObject.FindWithTag("Scripts").GetComponent <CustomPlayClipAtPoint>();
    }