public void Setup(string movingFlag, string activeFlag, float moveSpeed, Vector3 startPos, Vector3 endPos) { this.moveSpeed = moveSpeed; if (this.movingFlag != "") { this.movingFlag = movingFlag; } if (this.activeFlag != "") { this.activeFlag = activeFlag; } this.startPos = startPos; this.endPos = endPos; this.targetPos = endPos; GlobalFlags.Subscribe(this, movingFlag); GlobalFlags.Subscribe(this, activeFlag); moving = GlobalFlags.IsSet(movingFlag); setActiveFlag(GlobalFlags.IsSet(activeFlag)); }