Added my new ships via selectors via main menu. wanted to setup first animation working over tnet, since i tested them via my old JS. cant seem to get them working over tnet yet what my issue? tried it a number of ways.. Going to pull apart my ui kit i got yesterday for tnet and ngui maybe add some more insight for me.
js play single animation on key press
var PowerOn : AnimationClip;
function Start() {
}
function Update() {
if( Input.GetKeyDown(KeyCode.k) ) {
animation.Play("LandingGearsDown01");
audio.Play();
}
}
C# play single animation on key press over tnet
using UnityEngine;
using TNet;
public class ShipAnimations : TNBehaviour
{
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (tno.isMine)
{
if (Input.GetKeyDown(KeyCode.K))
tno.Send("Play", Target.All);
}
}
[RFC] void Play() {
animation.Play("LandingGearsDown01");
}
}