31 lines
775 B
C#
31 lines
775 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
|
|
public class Test_All : MonoBehaviour
|
|
{
|
|
public GameObject monsterPrefab;
|
|
|
|
|
|
public void Update()
|
|
{
|
|
if (Keyboard.current.aKey.wasPressedThisFrame)
|
|
{
|
|
CreateSmallMonster();
|
|
}
|
|
|
|
}
|
|
public void CreateSmallMonster()
|
|
{
|
|
//初始化
|
|
GameObject obj = Instantiate(monsterPrefab,Vector3.one*999,Quaternion.identity);
|
|
var v = obj.GetComponent<MonsterControl>();
|
|
v.dic_AnimKeyAnimName.Add(CharacterAnimationType.move, "stand2");
|
|
|
|
v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线"+Random.Range(1,4).ToString()], 10);
|
|
|
|
|
|
}
|
|
}
|