public CellPosition SetPosition(int x, int y) { position.x = x; position.y = y; transform.position = position.ToVector3Int(); return(position); }
public Entity Init(CellPosition pos, SpriteType spriteType = SpriteType.Nothing, Color?color = null, bool blocks = false, string name = "mysterious enemy") { this.position = pos; this.transform.position = pos.ToVector3Int(); this.sprite = SpriteLoader.instance.LoadSprite(spriteType); this.color = color ?? Color.magenta; this.blocks = blocks; this.name = name; spriteRenderer.sprite = this.sprite; spriteRenderer.color = this.color; return(this); }