Files
5.24BuYu/Assets/MyGame/Scripts/Test_All.cs
T
2026-04-21 23:33:59 +08:00

32 lines
791 B
C#

// using CameraShake;
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<MonsterContral>();
//v.dic_AnimKeyAnimName.Add(CharacterAnimationType.move, "stand2");
v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线"+Random.Range(1,4).ToString()], 10);
}
}