public override int GetHashCode() { unchecked { return((NoteTime.GetHashCode() * 397) ^ (NoteContent != null ? NoteContent.GetHashCode() : 0)); } }
void Start() { string JSONSong = Application.dataPath + "\\Songs\\" + SongName + ".json"; Song = SongLoader.LoadSong(JSONSong); scoreDisplay = GameObject.Find("ScoreDisplay").GetComponent <Text>(); multiplierDisplay = GameObject.Find("MulitplierDisplay").GetComponent <Text>(); //keep track of existing notes spawnedNotes = new List <GameObject>(); //We will most likely be creating the spawn nodes in code rather than fetching them //Even more likely we will store raw positions in Vector3 rather than even needing GameObjects Transform spawnLocs = GameObject.Find("NoteSpawnLocs").transform; SpawnLocations = new GameObject[] { spawnLocs.GetChild(0).gameObject, spawnLocs.GetChild(1).gameObject, spawnLocs.GetChild(2).gameObject }; //initialize spawn Debug.Log(Song.SpawnTime_SpawnLoc[0]); nextNote = Song.Spawn(); //add method to event //spawnEvent.AddListener(Camera.main.gameObject.GetComponent<DebugText>().UpdateDebugText); spawnEvent.AddListener(SpawnNote); //hitbar set hitBar = GameObject.Find("HitBar"); }
public override int GetHashCode() { unchecked { var hashCode = NoteTime.GetHashCode(); hashCode = (hashCode * 397) ^ (NoteContent != null ? NoteContent.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ChildCallNotes != null ? Utilities.GetHashCode(ChildCallNotes) : 0); return(hashCode); } }
//Gives the next note to spawn and increments spawn count public NoteTime Spawn() { //Basically if there isn't anymore to spawn return something so we don't get out of index errors if (spawned >= NoteNum) { return(new NoteTime(-1f, -1)); } NoteTime ret = SpawnTime_SpawnLoc[spawned]; spawned++; return(ret); }
void SpawnNote() { //create a note and then setup next spawn //Debug.Log(nextNote.Value); GameObject spawned = Instantiate(note, SpawnLocations[nextNote.SpawnLocation].transform); spawned.name = "Note " + Song.spawned; //add spawned to the list spawnedNotes.Add(spawned); //Set the note's speed to the speed of the song spawned.GetComponent <NoteBehaviour>().Speed = Song.SongSpeed; spawned.GetComponent <NoteBehaviour>().NoteDestoyed += OnDestroyedNote; //Debug.Log(spawned); //setup next spawn nextNote = Song.Spawn(); }
public SlidePoint(Note previous, AnchorNote anchorPoint, NoteTime time, LanePosition position) : base(time, position) { Previous = previous; AnchorPoint = anchorPoint; }
public SlidePoint(Note previous, NoteTime time, LanePosition position) : base(time, position) { Previous = previous; AnchorPoint = null; }
public SlideNote(NoteTime time, LanePosition position, SlidePoint[] slidePoints) : base(time, position, slidePoints) { }
protected bool Equals(CallNote other) { return(NoteTime.Equals(other.NoteTime) && NoteContent == other.NoteContent && Utilities.EqualsAll(ChildCallNotes, other.ChildCallNotes)); }
protected bool Equals(ChildCallNote other) { return(NoteTime.Equals(other.NoteTime) && NoteContent == other.NoteContent); }
public HeldNote(NoteTime time, LanePosition position, SlidePoint[] slidePoints) : base(time, position) { SlidePoints = slidePoints; }
public PartialData(int type, LanePosition pos, NoteTime time) { Type = type; Pos = pos; Time = time; }
public SimpleNote(NoteTime time, LanePosition position, bool golden) : base(time, position) { Golden = golden; }
private void Add() { if (Instruction == "Break") { if (!CheckValidHuboEntry(HuboStart)) { return; } if (!CheckValidHuboEntry(HuboEnd)) { return; } BreakTable breakAdd = new BreakTable() { StartDate = BreakStart.ToString(Resource.DateFormat), EndDate = BreakEnd.ToString(Resource.DateFormat), StartLocation = LocationStart, EndLocation = LocationEnd }; MessagingCenter.Send(this, "Break_Added", breakAdd); } else if (Instruction == "Note") { NoteTable note = new NoteTable() { Date = NoteTime.ToString(Resource.DateFormat), Note = NoteDetail }; MessagingCenter.Send(this, "Note_Added", note); } else if (Instruction == "Drive Shift") { if (!CheckValidHuboEntry(HuboStart)) { return; } if (!CheckValidHuboEntry(HuboEnd)) { return; } List <VehicleTable> vehicleKey = new List <VehicleTable>(); vehicleKey = GetVehicles(); DriveTable drive = new DriveTable() { StartDate = DriveStartTime.ToString(Resource.DateFormat), EndDate = DriveEndTime.ToString(Resource.DateFormat), StartHubo = int.Parse(HuboStart), EndHubo = int.Parse(HuboEnd), ActiveVehicle = false, VehicleKey = vehicleKey[SelectedVehicle].Key }; MessagingCenter.Send(this, "Drive_Added", drive); } Navigation.PopModalAsync(); }
public Mine(NoteTime time, LanePosition position) : base(time, position) { }
public AnchorNote(NoteTime time, LanePosition position) : base(time, position) { }
public AirArrow(NoteTime time, LanePosition position, bool isUp, int arrowShift) : base(time, position) { IsUp = isUp; ArrowShift = arrowShift; }
public Note(NoteTime time, LanePosition position) { Time = time; Position = position; }
public SwipeNote(NoteTime time, LanePosition position) : base(time, position) { }
public AirAction(NoteTime time, LanePosition position) : base(time, position) { }