Beispiel #1
0
    public void InstHint(GameObject obj)
    {
        RectTransform  hintRecTrans = GetComponent <RectTransform>();
        RectTransform  objRecTrans  = obj.GetComponent <RectTransform>();
        SpriteRenderer hintSprite   = GetComponent <SpriteRenderer>();

        hintSprite.sprite = obj.GetComponent <SpriteRenderer>().sprite;
        MessageSystemGameBlock.CopyRecTransform(hintRecTrans, objRecTrans);
    }
Beispiel #2
0
 public void RestoreEnemy()
 {
     MessageSystemGameBlock.CopyRecTransform(buf[2], buf[0]);
     buf[1].GetComponent <Image>().color          = Color.white;
     buf[2].GetComponent <SpriteRenderer>().color = Color.white;
     buf[3].GetComponent <SpriteRenderer>().color = Color.white;
     for (int i = 1; i < 4; i++)
     {
         buf[i].gameObject.SetActive(true);
     }
     buf[2].GetComponent <Rigidbody2D>().simulated     = true;
     buf[2].GetComponent <PolygonCollider2D>().enabled = true;
     gameObject.SetActive(false);
 }
Beispiel #3
0
 public void RestoreRobot()
 {
     RectTransform[] bufRecTrans = GetComponentsInChildren <RectTransform>();
     for (int i = 1; i < 7; i++)
     {
         if (!bufRecTrans[i].CompareTag("Partical"))
         {
             MessageSystemGameBlock.CopyRecTransform(bufRecTrans[i], buf[i - 1]);
             bufRecTrans[i].GetComponent <Image>().color = Color.white;
         }
     }
     RobotBody.IsOne = false;
     gameObject.SetActive(false);
 }