前提・実現したいこと
unityの
macanimのスクリプトを改造して自由にモーションを入れたいのですが、、、
ここに質問の内容を詳しく書いてください。
(例)PHP(CakePHP)で●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
expected
エラーメッセージ expected??? ### 該当のソースコード ```ここに言語名を入力 c# ソースコード
試したこと
/// <summary>
///
/// </summary>
using UnityEngine;
using System;
using System.Collections;
[RequireComponent(typeof(Animator))]
//Name of class must be name of file as well
public class LocomotionPlayer : MonoBehaviour {
protected Animator animator; // Use this for initialization void Start(){ anim=GetComponentc<Animator>(); } //Update is called once per frame void Update (){ if (Input.GetKeyDown("1")){ anim. Play ("WAIT01", -1, 0f); }else if(Input.GetKeyDown("2")){ anim. Play ("WAIT02", -1, 0f); }else if(Input.GetKeyDown("3")){ anim. Play ("WAIT03", -1, 0f); }else if(Input.GetKeyDown("4")){ anim.Play ("WAIT4", -1, er)} (←ここで問題が生じます)
}
private float speed = 0; private float direction = 0; private Locomotion locomotion = null; // Use this for initialization void Start () { animator = GetComponent<Animator>(); locomotion = new Locomotion(animator); } void Update () { if (animator && Camera.main) { JoystickToEvents.Do(transform,Camera.main.transform, ref speed, ref direction); locomotion.Do(speed * 6, direction * 180); } }
}
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
すみません、初心者です、
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/04/04 02:13
2018/04/04 02:15