// Use this for initialization void Start() { component = GetComponent<CharPosEffComp>(); stateComponent = GetComponent<CharAnimEffComp>(); stateEff = GetComponent<CharAnimEff>(); statusComponent = GetComponent<ActorStatusComponent>(); charController = GetComponent<CharacterController>(); }
public void ReceiveMoveDirection(CharPosEffComp.NetworkMoveDirection dir) { if(SFSNetworkManager.Mode.HOSTREMOTE == mode){ if(moveDirInterpolator != null){ moveDirInterpolator.ReceivedItem(dir); } } else{ // Debug.LogError("wrong mode"); } }
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>(); }
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"); } }
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); }
void Start() { component = GetComponent<CharPosEffComp>(); syncObj = GetComponent<NetSyncObjCharacter>(); }