Exemple #1
0
 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);
     }
 }
Exemple #4
0
    //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();
    }
Exemple #6
0
 public SlidePoint(Note previous, AnchorNote anchorPoint, NoteTime time, LanePosition position) : base(time, position)
 {
     Previous    = previous;
     AnchorPoint = anchorPoint;
 }
Exemple #7
0
 public SlidePoint(Note previous, NoteTime time, LanePosition position) : base(time, position)
 {
     Previous    = previous;
     AnchorPoint = null;
 }
Exemple #8
0
 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));
 }
Exemple #10
0
 protected bool Equals(ChildCallNote other)
 {
     return(NoteTime.Equals(other.NoteTime) && NoteContent == other.NoteContent);
 }
Exemple #11
0
 public HeldNote(NoteTime time, LanePosition position, SlidePoint[] slidePoints) : base(time, position)
 {
     SlidePoints = slidePoints;
 }
Exemple #12
0
 public PartialData(int type, LanePosition pos, NoteTime time)
 {
     Type = type;
     Pos  = pos;
     Time = time;
 }
Exemple #13
0
 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();
        }
Exemple #15
0
 public Mine(NoteTime time, LanePosition position) : base(time, position)
 {
 }
Exemple #16
0
 public AnchorNote(NoteTime time, LanePosition position) : base(time, position)
 {
 }
Exemple #17
0
 public AirArrow(NoteTime time, LanePosition position, bool isUp, int arrowShift) : base(time, position)
 {
     IsUp       = isUp;
     ArrowShift = arrowShift;
 }
Exemple #18
0
 public Note(NoteTime time, LanePosition position)
 {
     Time     = time;
     Position = position;
 }
Exemple #19
0
 public SwipeNote(NoteTime time, LanePosition position) : base(time, position)
 {
 }
Exemple #20
0
 public AirAction(NoteTime time, LanePosition position) : base(time, position)
 {
 }