public void Draw() { if (_AnimationID == "") { TargetSprite.Draw(this, AnimationIndex, Depth); } else //resolve AnimationID to actual frame { TargetSprite.Draw(this, TargetSprite.Animations[_AnimationID][AnimationIndex], Depth); } }
public void CreateEnemy(TargetSprite enemy) { var newEnemy = Instantiate(enemy); newEnemy.transform.SetParent(GameObject.FindGameObjectWithTag("Enemies").transform); }