Files
5.24BuYu/Assets/MyGame/Scripts/Test_All.cs
T

32 lines
791 B
C#
Raw Normal View History

2026-04-21 23:33:59 +08:00
// using CameraShake;
2026-04-03 09:28:13 +08:00
using System.Collections;
2025-12-26 11:15:56 +08:00
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();
}
2026-04-03 09:28:13 +08:00
2025-12-26 11:15:56 +08:00
}
public void CreateSmallMonster()
{
//初始化
GameObject obj = Instantiate(monsterPrefab,Vector3.one*999,Quaternion.identity);
2026-02-03 11:35:19 +08:00
var v = obj.GetComponent<MonsterContral>();
2025-12-26 18:19:12 +08:00
//v.dic_AnimKeyAnimName.Add(CharacterAnimationType.move, "stand2");
2025-12-26 11:15:56 +08:00
v.monsterData.moveLine.Init(MonsterMoveLine.dic_BezierCurveDatas["曲线"+Random.Range(1,4).ToString()], 10);
}
}