public void DeleteShotPoint() { DeleteAllLineMarker(); if (currPoint == null) { return; } int count = frames.Count; for (int i = 0; i < count; ++i) { EnemyDatabase.BulletFrameInfo info = currInfo.bullet[i]; if (info.bulletInfo.Count != 0) { //int count = info.bulletInfo.Count; for (int j = 0; j < info.bulletInfo.Count;) { if (info.bulletInfo[j].shotPoint == currShotPoint) { info.bulletInfo.RemoveAt(j); } else if (info.bulletInfo[j].shotPoint > currShotPoint) { info.bulletInfo[j].shotPoint--; ++j; } else { ++j; } } } } FirePointMarker save = currPoint; currInfo.shotPoint.RemoveAt(currShotPoint); markers.RemoveAt(currShotPoint); for (int i = 0; i < markers.Count; ++i) { if (markers[i].code != i) { markers[i].code = i; } } save.Delete(); if (currFrame != null) { CreateLineMarker(); } FrameColorUpdate(); }
public void CreateFirePoint(int code) { FirePointMarker marker = Instantiate(shotPointOrigin, Vector2.zero, Quaternion.identity).GetComponent <FirePointMarker>(); marker.transform.SetParent(inGameObjects); marker.Init(code, currInfo); marker.PositionUpdate(); AddMarker(marker); }
public void CreateFirePoint() { int count = currInfo.shotPoint.Count; currInfo.shotPoint.Add(Vector2.zero); FirePointMarker marker = Instantiate(shotPointOrigin, Vector2.zero, Quaternion.identity).GetComponent <FirePointMarker>(); marker.transform.SetParent(inGameObjects); marker.Init(count, currInfo); AddMarker(marker); }
public void AddMarker(FirePointMarker obj) { markers.Add(obj); }