(client) feat:实现摄像机跟踪与移动,实现任意位置生成实体,实现更安全的资源加载方式(指定unity内部加载资源) (#42)
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.Linq;
|
||||
using AI;
|
||||
using Base;
|
||||
using Data;
|
||||
@ -13,11 +14,34 @@ namespace Prefab
|
||||
public Entity.Entity entity;
|
||||
public Outline outline;
|
||||
|
||||
public Vector3 Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return transform.position;
|
||||
}
|
||||
set
|
||||
{
|
||||
transform.position = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Init(Data.PawnDef pawnDef)
|
||||
{
|
||||
entity.Init(pawnDef);
|
||||
|
||||
|
||||
outline.Init();
|
||||
outline.Hide();
|
||||
}
|
||||
|
||||
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());
|
||||
outline.Init();
|
||||
outline.Hide();
|
||||
}
|
||||
|
Reference in New Issue
Block a user