Esempio n. 1
0
    public override void MakeMove(PlayInstructs instruct)
    {
        base.MakeMove(instruct);
        currNote = instruct.note;
        switch (instruct.action)
        {
        case Actions.ATTACK:
            Attack();
            break;

        case Actions.MOVE_BACK:
            MoveTowards(currTarget);
            break;

        case Actions.MOVE_FORWARD:
            MoveTowards(currTarget);
            break;

        case Actions.MOVE_ENEMY:
            MoveTowards(currTarget);
            break;

        case Actions.REST:
            Rest();
            break;
        }
    }
Esempio n. 2
0
    public virtual void MakeMove(PlayInstructs instrux)
    {
        ResetNotes();
        Color col = GetComponentInChildren <SpriteRenderer>().color;

        GetComponentInChildren <SpriteRenderer>().color = new Color(col.r, col.g, col.b, 1);
    }
Esempio n. 3
0
    public override void MakeMove(PlayInstructs instructs)
    {
        ResetNotes();
        Color col = sprite1.color;

        sprite1.color = new Color(col.r, col.g, col.b, 1);
        col           = sprite2.color;
        sprite2.color = new Color(col.r, col.g, col.b, 1);
        switch (instructs.action)
        {
        case Actions.REST:
            Rest();
            break;

        case Actions.ATTACK:
            Attack();
            break;

        default:
            Rest();
            break;
        }
    }
Esempio n. 4
0
    void PlayUnit(Puppet u)
    {
        if (unitCache.Contains(u.id))
        {
            return;
        }
        unitCache.Add(u.id);
        //float y = u.transform.position.y;
        //string[] noteArray;
        PlayInstructs instruct = u.CurrInstruction();

        switch (instruct.note)
        {
        case ConstFile.Notes.WHOLE:
            mm.wholeManager.AddInstruct(instruct);
            break;

        case ConstFile.Notes.HALF:
            //Debug.Log("added half");
            mm.halfManager.AddInstruct(instruct);
            break;

        case ConstFile.Notes.QUARTER:
            //Debug.Log("added quarter");
            mm.quarterManager.AddInstruct(instruct);
            break;

        case ConstFile.Notes.EIGHTH:
            //Debug.Log("added eigth");
            mm.eigthManager.AddInstruct(instruct);
            break;

        case ConstFile.Notes.SIXTEENTH:
            mm.sixteenthManager.AddInstruct(instruct);
            break;
        }
    }
Esempio n. 5
0
 public void AddInstruct(PlayInstructs newInstruct)
 {
     NoteQue.Add(newInstruct);
 }