public void Init(PawnStructConfig config) { if (Anim == null) { Anim = GetComponentInChildren <Anim2DComponent>(); } _trans = transform; _col = GetComponent <Collider2D>(); MoveData.Init(transform, Anim); _entity = config.GetEntity(); _entity.Init(this); _cmds = config.GetPawnCmds(this, _entity); EntityMapping.Instance.AddEntity(this); }
public virtual void Init(SpawnUnitConfig unitConfig) { HandleActions(); moveBehaviour.Init(unitConfig.Speed); }