Пример #1
0
 private void Awake()
 {
     pv      = GetComponent <PhotonView>();
     aniCtrl = GetComponent <CAnimaitonControl>();
     cCtrl   = GetComponent <CharacterController>();
     coll    = GetComponent <CapsuleCollider>();
 }
Пример #2
0
    private void Awake()
    {
        pv          = GetComponent <PhotonView>();
        cState      = GetComponent <CCharacterState>();
        aniCtrl     = GetComponent <CAnimaitonControl>();
        blockButton = GameObject.Find("BlockButton").GetComponent <Button>();

        blockButton.onClick.AddListener(BlockRPC);
    }
Пример #3
0
    private void Awake()
    {
        tr       = GetComponent <Transform>();
        aniCtrl  = GetComponent <CAnimaitonControl>();
        camPivot = GameObject.Find("CamPivot").GetComponent <Transform>();
        cState   = GetComponent <CCharacterState>();
        pv       = GetComponent <PhotonView>();
        rigid    = GetComponent <Rigidbody>();

        pv.synchronization       = ViewSynchronization.UnreliableOnChange;
        pv.ObservedComponents[0] = this;

        currPos = tr.position;
        currRot = tr.rotation;
    }
Пример #4
0
    private void Awake()
    {
        tr      = GetComponent <Transform>();
        nvAgent = GetComponent <NavMeshAgent>();
        cState  = GetComponent <CCharacterState>();
        aniCtrl = GetComponent <CAnimaitonControl>();
        pv      = GetComponent <PhotonView>();
        cCtrl   = GetComponent <CharacterController>();

        pv.synchronization       = ViewSynchronization.UnreliableOnChange;
        pv.ObservedComponents[0] = this;

        cState.state = CCharacterState.State.Move;

        currPos = tr.position;
        currRot = tr.rotation;
    }
Пример #5
0
    private void Awake()
    {
        tr       = GetComponent <Transform>();
        aniCtrl  = GetComponent <CAnimaitonControl>();
        camPivot = GameObject.Find("CamPivot").GetComponent <Transform>();
        cState   = GetComponent <CCharacterState>();
        pv       = GetComponent <PhotonView>();
        cCtrl    = GetComponent <CharacterController>();

        jumpButton = GameObject.Find("JumpButton").GetComponent <Button>();
        runButton  = GameObject.Find("RunButton").GetComponent <Button>();

        jumpButton.onClick.AddListener(Jump);
        runButton.onClick.AddListener(IsRunning);

        pv.synchronization       = ViewSynchronization.UnreliableOnChange;
        pv.ObservedComponents[0] = this;

        currPos = tr.position;
        currRot = tr.rotation;
    }