Beispiel #1
0
    void Start()
    {
        getGrid();

        harpoon = GameObject.FindGameObjectWithTag("Harpoon");
        harpoon.transform.localScale = Vector3.zero;
        harpoon.GetComponent <HarpoonHit>().harpoonHit.AddListener(GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>().harpoonTrigger);
        audioSource  = GetComponent <AudioSource>();
        playerSounds = GetComponent <PlayerSounds>();

        movedToTile.AddListener(grid.destroyTile);
        movedThroughVWall.AddListener(grid.destroyVWall);
        movedThroughHWall.AddListener(grid.destroyHWall);

        playerDied.AddListener(grid.onPlayerDie);
    }
 void Init()
 {
     OnMouseDragRight.AddListener(delta => MouseDragRight(delta));
     OnMouseDragMiddle.AddListener(delta => MouseDragMiddle(delta));
     OnScrollWheel.AddListener(deltaY => ScrollWheel(deltaY));
 }