private FollowerEnemy(FollowerEnemyObject gameObject, int homeTileRow, int homeTileCol, out bool success) : base(gameObject, out success) { this.gameObject = gameObject; this.homeTileRow = homeTileRow; this.homeTileCol = homeTileCol; XVelocity = 1; }
public static FollowerEnemy Make(FollowerEnemyObject followerEnemyPrefab, int row, int col, Transform parent = null) { followerEnemyPrefab = Object.Instantiate(followerEnemyPrefab); followerEnemyPrefab.transform.parent = parent; followerEnemyPrefab.spawnRow = row; followerEnemyPrefab.spawnCol = col; FollowerEnemy result = new FollowerEnemy(followerEnemyPrefab, row, col, out bool success); return(success ? result : null); }