예제 #1
0
    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);
    }
예제 #2
0
 public virtual void Init(SpawnUnitConfig unitConfig)
 {
     HandleActions();
     moveBehaviour.Init(unitConfig.Speed);
 }