// Start is called before the first frame update
    void Start()
    {
        darkPlayerScript = this.GetComponent <DarkOrbController>();

        // animator = this.transform.GetChild(0).transform.GetChild(0).GetComponent<Animator>();
        animator = this.transform.GetChild(0).GetComponent <Animator>();
    }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        darkScript = this.GetComponent <DarkOrbController>();

        runPartSys  = runParticles.GetComponent <ParticleSystem>();
        jumpPartSys = jumpParticles.GetComponent <ParticleSystem>();

        runPartSys.Stop();
        jumpPartSys.Stop();
    }
Esempio n. 3
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (collision.tag == "CameraAreaTrigger")
     {
         if (this.gameObject.layer == 11)//Angel layer
         {
             LightOrbController script = this.GetComponent <LightOrbController>();
             if (script.getIsControlsActive())//If this is the active player
             {
             }
         }
         else
         {
             DarkOrbController script = this.GetComponent <DarkOrbController>();
             if (script.getIsControlsActive())
             {
             }
         }
     }
 }
Esempio n. 4
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.tag == "Player")
     {
         if (collision.gameObject.layer == 11)//Angel layer
         {
             LightOrbController script = collision.GetComponent <LightOrbController>();
             if (script.getIsControlsActive())
             {
                 ClearCameraOffsets();
             }
         }
         else
         {
             DarkOrbController script = collision.GetComponent <DarkOrbController>();
             if (script.getIsControlsActive())
             {
                 ClearCameraOffsets();
             }
         }
     }
 }