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

        blockButton.onClick.AddListener(BlockRPC);
    }
Beispiel #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;
    }
Beispiel #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;
    }
Beispiel #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;
    }