I setup movement and animations but flipping sprites i dont know how to do.
For flipping locally i have:
//flip the sprites
if (Input.GetAxis ("Horizontal") > 0.1f)
transform.localScale = new Vector3 (-1, 1, 1);
if (Input.GetAxis ("Horizontal") < -0.1f)
transform.localScale = new Vector3 (1, 1, 1);
Here is my send and receiving of transform and animation triggers: (remember this is 2D so no rotation)
public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info){
if (stream.isWriting) {
// This is OUR player. We need to send our actual position to the network
stream.SendNext(transform.position);
stream.SendNext(anim.GetFloat("speed"));
stream.SendNext(anim.GetFloat("speedY"));
stream.SendNext(anim.GetBool("grounded"));
stream.SendNext(anim.GetBool("sitting"));
} else {
// This is someone else's player. We need to recieve their position
realPosition = (Vector3)stream.ReceiveNext();
anim.SetFloat("speed",(float)stream.ReceiveNext());
anim.SetFloat("speedY",(float)stream.ReceiveNext());
anim.SetBool("grounded",(bool)stream.ReceiveNext());
anim.SetBool("sitting",(bool)stream.ReceiveNext());
}