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

        //animator = this.transform.GetChild(0).transform.GetChild(1).GetComponent<Animator>();
        animator = this.transform.GetChild(1).GetComponent <Animator>();
    }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        lightScript = this.GetComponent <LightOrbController>();

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

        runPartSys.Stop();
        jumpPartSys.Stop();
    }
Example #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())
             {
             }
         }
     }
 }
Example #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();
             }
         }
     }
 }