All Script:
//-----------------------------------------------------------------------
// <copyright file="Player.cs" company="Scalify">
// Copyright (c) 2012 Scalify. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.IO;
using Badumna;
using Badumna.DataTypes;
using Badumna.SpatialEntities;
using UnityEngine;
using Vector3 = Badumna.DataTypes.Vector3;
// Class for representing a player's position and any additional properties.
// As this class represent a replicable entity, it has to implement the
// IReplicableEntity interface.
///
// Define all replicable properties and RPC methods in this class and remember
// to tag them with [Replicable] attribute.
///
// Replicable properties you define here will typicallly wrap a property on the
// Unity game object representing the player. For example, the existing Position
// and Orientation properties wrap the Unity game object's transform's position
// and rotation.
public class Player : MonoBehaviour
{
// Gets or sets the position of the entity.
// This property is automatically replicated by Badumna.
[Smoothing(Interpolation = 200, Extrapolation = 0)]
[Replicable]
public Vector3 Position
{
get
{
var position = this.gameObject.transform.position;
return new Vector3(position.x, position.y, position.z);
}
set
{
this.gameObject.transform.position = new UnityEngine.Vector3(value.X, value.Y, value.Z);
}
}
// Gets or sets the direction the player is facing.
[Replicable]
public float Orientation
{
get
{
return this.gameObject.transform.rotation.eulerAngles.y;
}
set
{
this.gameObject.transform.rotation = Quaternion.AngleAxis(value, UnityEngine.Vector3.up);
}
}
//Animation Controller.
private ThirdPersonSimpleAnimation.animationController;
//Get or Set the name for the players.
public string CharacterName (get; set;)
//Get or Set the name of the plaer animation currently playing.
[Replicable]
public string AnimationName
{
get
{
return ThirdPersonSimpleAnimation.animationController;
}
set
{
this.animationController.AnimationName = value;
}
}
//Grab the ThirdPersonSimpleAnimation on Awake
private void Awake()
{
this.animationController = this.GetComponent<ThirdPersonSimpleAnimation>();
}
}
i have one error on:
Assets/Script/Network/Player.cs(64,63): error CS1519: Unexpected symbol `;’ in class, struct, or interface member declaration
Assets/Script/Network/Player.cs(67,38): error CS1041: Identifier expected
Assets/Script/Network/Player.cs(70,9): error CS1519: Unexpected symbol `[’ in class, struct, or interface member declaration
//Animation Controller.
private ThirdPersonSimpleAnimation.animationController;
//Get or Set the name for the players.
public string CharacterName (get; set;)
//Get or Set the name of the plaer animation currently playing.
[Replicable]
public string AnimationName
{
get
{
return ThirdPersonSimpleAnimation.animationController;
}
set
{
this.animationController.AnimationName = value;
}
}
//Grab the ThirdPersonSimpleAnimation on Awake
private void Awake()
{
this.animationController = this.GetComponent<ThirdPersonSimpleAnimation>();
}
Help me to fixit