Exemple #1
0
 private void OnDnaSet(Types.DNA type)
 {
     //print(type);
     //sr.color = Types.GetDNAColor(type);
     //print(Types.GetDNAColor(type));
     //sr.color = Types.GetDNAColor(type);
 }
Exemple #2
0
 public void DNAType(Types.DNA type)
 {
     if (!_dnaTypeSet)
     {
         Debug.Log(type);
         _dnaType = type;
         OnDNASet(type);
     }
 }
Exemple #3
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        GameObject other = collision.gameObject;

        if (other.CompareTag("cas1cas2"))
        {
            script = other.gameObject.GetComponentInParent <Cas1Cas2>();
            Debug.Log(script.ReturnDNA());
            if (script.IsMarked())
            {
                return;
            }
            else if (script.IsGrabbing())
            {
                if (holder.InVirusTypes(script.ReturnDNA()))
                {
                    return;
                }
                else
                {
                    GameObject.Find("SFXController").GetComponent <AudioButtonController>().Play("HighClick");
                    if (script.isItTutorial())
                    {
                        FindObjectOfType <GameController>().InitiateNextStep();
                    }
                    Types.DNA casType = Types.GetDNA(script.ReturnDNA());
                    heldDNA = script.ReturnDNA();
                    Debug.Log(casType);
                    slot.DNAType(casType);
                    if (dnaType != 0)
                    {
                        holder.RemoveVirusType(dnaType);
                    }
                    holder.AddVirusType(script.ReturnDNA());
                    dnaType = script.ReturnDNA();
                    Debug.Log(Types.GetColor(script.ReturnDNA()));
                    sr.color = Types.GetColor(script.ReturnDNA());
                    script.MarkForDeath();
                    script.Death();
                }
            }
        }
    }
Exemple #4
0
 private void OnDNaSet(Types.DNA type)
 {
     indicator.color = Types.GetDNAColor(type);
 }