(client) feat:实现热重载,实现多维度,实现武器,实现掉落物,实现状态UI,实现攻击AI (#44)
Co-authored-by: zzdxxz <2079238449@qq.com> Co-committed-by: zzdxxz <2079238449@qq.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AI;
|
||||
using Base;
|
||||
@ -37,11 +38,17 @@ namespace Prefab
|
||||
public void DefaultInit()
|
||||
{
|
||||
var animator = GetComponentsInChildren<SpriteAnimator>();
|
||||
ITick[] inf = animator;
|
||||
entity.bodyAnimationNode.Add(Orientation.Down,inf.ToList());
|
||||
entity.bodyAnimationNode.Add(Orientation.Up,inf.ToList());
|
||||
entity.bodyAnimationNode.Add(Orientation.Left,inf.ToList());
|
||||
entity.bodyAnimationNode.Add(Orientation.Right,inf.ToList());
|
||||
var inf = animator.Cast<ITick>().ToArray();
|
||||
foreach (EntityState state in Enum.GetValues(typeof(EntityState)))
|
||||
{
|
||||
var orientationDict = new Dictionary<Orientation, ITick[]>();
|
||||
foreach (Orientation orientation in Enum.GetValues(typeof(Orientation)))
|
||||
{
|
||||
orientationDict[orientation] = inf; // 所有值都指向同一个列表
|
||||
}
|
||||
entity.bodyAnimationNode[state] = orientationDict;
|
||||
}
|
||||
|
||||
outline.Init();
|
||||
outline.Hide();
|
||||
}
|
||||
|
Reference in New Issue
Block a user