Example #1
0
    // Use this for initialization
    void Start()
    {
        _animator = gameObject.GetComponentInChildren<Animator> ();
        w = _animator.GetBehaviour<Walk> ();

        w.Init (velocity, transform);
    }
 // Use this for initialization
 void Start()
 {
     anim = GetComponent<Animator>();
     stateGlow = Animator.StringToHash("Photo.Glow");
     beh = anim.GetBehaviour<StateEventBehaviour>();
     beh.StateEntered += Beh_StateEntered;
     currentSprite = EmptySprite;
     img = GetComponent<Image>();
 }
    void Awake()
    {
        animatorController = this.GetComponent<Animator>();

        if (animatorController == null) throw new MissingReferenceException("Missing a reference to the PlayerAnimatorControler on the " + this.gameObject);

        camera = this.GetComponent<Transform>();

        var zoomOutState  = animatorController.GetBehaviour<AnimationStateEventDelegator>();
        zoomOutState.OnExit += OnZoomOutExit;
    }
    // Use this for initialization
    void Start()
    {
        firstMesh = FirstPage.GetComponent<MeshRenderer>();
        secondMesh = SecondPage.GetComponent<MeshRenderer>();
        cont = FPSPlayer.GetComponent<PlayerController>();

        anim = GetComponent<Animator>();
        beh = anim.GetBehaviour<StateEventBehaviour>();
        beh.StateEntered += Beh_StateEntered;
        beh.StateExited += Beh_StateExited;

        idleState = Animator.StringToHash("Notebook.Idle");
        forwardState = Animator.StringToHash("Notebook.Forward");
        backwardState = Animator.StringToHash("Notebook.Backward");
        closedState = Animator.StringToHash("Notebook.Closed");
        lastInfo = anim.GetCurrentAnimatorStateInfo(0);
        audioSource = GetComponent<AudioSource>();
    }
 public void ResetStateManager(Animator _animator)
 {
     attackState = _animator.GetBehaviour<CharacterAttackState> ();
     deadState = _animator.GetBehaviour<CharacterDeadState> ();
     skillState = _animator.GetBehaviour<CharacterSkillState>();
 }
    // 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();
    }
 // Use this for initialization
 void Start()
 {
     m_characterCtrl = GetComponent<CharacterController>();
     m_animator = GetComponent<Animator>();
     damageController = GetComponent<DamageController>();
     AttackBehaviour ab = m_animator.GetBehaviour<AttackBehaviour>();
     //ab.damageController = damageController;
     target = GameObject.Find("ashe");
     navAgent = GetComponent<NavMeshAgent>();
     Shader.WarmupAllShaders();
 }
    // SAMPLE TEXT  that is hardcoded for now//
    // -- Can be somewhat dynamic later on -- //
    // Use this for initialization
    void Start()
    {
        //menuCanvas.SetActive(false);

        animator = animator.GetComponent<Animator>();

        portrait = portrait.GetComponent<Image>();

        animator.GetBehaviour <TransClass> ().transition=nextScene;

        for(int i=0; i< charsToLoad; ++i)
            charImg[i]=charImg[i].GetComponent<Image>();

        charName = charName.GetComponent<Text>();
        continueText=continueText.GetComponent<Button>();
        convoText= convoText.GetComponent<Button>();

        portrait.sprite=charImg[person[currPart]].sprite;
        charName.text=charImg[person[currPart]].tag;
        convoText.GetComponentInChildren<Text>().text=speech[currPart++];
        //menuCanvas.SetActive();
    }