Пример #1
0
 // Use this for initialization
 void Start()
 {
     component = GetComponent<CharPosEffComp>();
     stateComponent = GetComponent<CharAnimEffComp>();
     stateEff = GetComponent<CharAnimEff>();
     statusComponent = GetComponent<ActorStatusComponent>();
     charController = GetComponent<CharacterController>();
 }
Пример #2
0
 public void ReceiveMoveDirection(CharPosEffComp.NetworkMoveDirection dir)
 {
     if(SFSNetworkManager.Mode.HOSTREMOTE == mode){
         if(moveDirInterpolator != null){
             moveDirInterpolator.ReceivedItem(dir);
         }
     }
     else{
     //			Debug.LogError("wrong mode");
     }
 }
Пример #3
0
    void Start()
    {
        RunAnimationNameHash = Animator.StringToHash(CharAnimEffComp.RunAnimationName);
        IdleAnimationNameHash = Animator.StringToHash(CharAnimEffComp.IdleAnimationName);
        Slash1AnimationNameHash = Animator.StringToHash(CharAnimEffComp.Slash1AnimationName);
        Slash2AnimationNameHash = Animator.StringToHash(CharAnimEffComp.Slash2AnimationName);

        animator = GetComponent<Animator>();
        component = GetComponent<CharAnimEffComp>();
        posComponent = GetComponent<CharPosEffComp>();
        posEffector = GetComponent<CharPosEff>();
    }
Пример #4
0
 public void ReceiveResultant(CharPosEffComp.NetworkResultant ntr)
 {
     if(SFSNetworkManager.Mode.REMOTE == mode || SFSNetworkManager.Mode.PREDICT == mode){
         if(resultantInterpolator != null){
     //				Debug.Log("received pos: transform: " + ntr.position + ", velocity: " + ntr.velocity + ", time: " + ntr.timeStamp);
             resultantInterpolator.ReceivedItem(ntr);
         }
     }
     else{
     //			Debug.LogError("wrong mode");
     }
 }
Пример #5
0
    void Start()
    {
        component = GetComponent<CharPosEffComp>();

         	moveDirInterpolator = new Interpolator<CharPosEffComp.NetworkMoveDirection>(
            useInterpolation,
            interpolatorBackTime,
            CharPosEffComp.NetworkMoveDirection.Interpolate,
            useExtrapolation,
            interpolatorExTime,
            CharPosEffComp.NetworkMoveDirection.Extrapolate);

        resultantInterpolator = new Interpolator<CharPosEffComp.NetworkResultant>(
            useInterpolation,
            interpolatorBackTime,
            CharPosEffComp.NetworkResultant.Interpolate,
            useExtrapolation,
            interpolatorExTime,
            CharPosEffComp.NetworkResultant.Extrapolate);
    }
Пример #6
0
 void Start()
 {
     component = GetComponent<CharPosEffComp>();
     syncObj = GetComponent<NetSyncObjCharacter>();
 }