// Use this for initialization
 void Start()
 {
     found = new List<PageImageScript>();
     imageScript = GetComponent<PageImageScript>();
     imageScripts = Collectibles.Select(i => i.GetComponent<PageImageScript>()).ToArray();
     foreach(var s in imageScripts)
     {
         s.FoundEvent += Img_FoundEvent;
     }
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        cont = FPSPlayer.GetComponent<PlayerController>();
        parts = GetComponent<ParticleSystem>();
        targetScript = TargetImage.GetComponent<PageImageScript>();
        nbscript = Notebook.GetComponent<NotebookScript>();

        stateSpinning = Animator.StringToHash("Card.Spinning");
        stateStopped = Animator.StringToHash("Card.Stopped");
        statePutaway = Animator.StringToHash("Card.Putaway");

        anim = GetComponentInChildren<Animator>();
        beh = anim.GetBehaviour<StateEventBehaviour>();
        beh.StateEntered += Beh_StateEntered;
        beh.StateExited += Beh_StateExited;
        //        linkedScripts = LinkedCards.Select(i => i.GetComponent<CardScript>()).ToArray();
    }