void Start()
    {
        gameManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>();
        effectLight = GetComponent <LOS.LOSRadialLight>();

        Invoke("Explode", FuseTime);
    }
Beispiel #2
0
    void Start()
    {
        naviLight = GameObject.Find("Navi Light").GetComponent<LOSRadialLight>();
        dialog = GetComponent<Dialog>();
        ps = GameObject.Find("particle glow master").GetComponent<ParticleSystem>();

        Events.Register<OnPauseEvent>(OnPause);
        Events.Register<OnDeathEvent>(() => {
            Player.S.transform.position = Checkpoint.getClosestCheckpoint();
            resetNavi ();
        });

        rb = GetComponent<Rigidbody2D>();
        Physics2D.IgnoreCollision(GetComponent<CircleCollider2D>(), Player.S.GetComponent<PolygonCollider2D>());

        nextMovetime = Time.time + moveFreq;
        targetPos = playerRelativePosition();
    }
 void Start()
 {
     lightPoint = GameObject.FindGameObjectWithTag("Flashlight").transform.GetChild(0);
     radialLightEmitter = GetComponent<LOS.LOSRadialLight>();
     playerInput = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerInput>();
 }