Beispiel #1
0
 protected override void Initialize()
 {
     base.Initialize ();
     gameObject.SetActive (true);
     gameObject.AddComponent<SpriteRenderer>();
     abstractPet = GameObject.Find ("Pet").GetComponent<AbstractPet>();
 }
Beispiel #2
0
 protected virtual void Initialize()
 {
     minutes = 0.0f;
     gameObject.AddComponent<SpriteRenderer>();
     spriteRenderer = GetComponent<SpriteRenderer>();
     pet = GameObject.Find("/Pet");
     abstractPetScript = pet.GetComponent<AbstractPet>();
 }
Beispiel #3
0
    protected virtual void Initialize()
    {
        abstractPet = GameObject.Find ("/Pet").GetComponent<AbstractPet> ();
        type = abstractPet.Type ();

        if (!GetComponent<Animator> ()) {
            gameObject.AddComponent<Animator> ();
        }

        if (!GetComponent<SpriteRenderer> ()) {
            gameObject.AddComponent<SpriteRenderer> ();
        }
        spriteRenderer = GetComponent<SpriteRenderer> ();
    }
Beispiel #4
0
 void Initialize()
 {
     gameObject.AddComponent<SpriteRenderer>();
     spriteRenderer = GetComponent<SpriteRenderer> ();
     Texture2D texture = Resources.Load<Texture2D> ("Images/Icon/name_frame");
     spriteRenderer.sprite = SpriteManager.GetSprite (texture);
     transform.localScale = new Vector3 (1f, 0.6f, 1.0f);
     transform.localPosition = PositionManager.GetFitPosition (0, 0.9f, 3.0f);
     CreateIcon ();
     framePosition = Camera.main.WorldToScreenPoint(transform.position);
     iconPosition = Camera.main.WorldToScreenPoint(icon.transform.position);
     sizeY = spriteRenderer.bounds.size.y * Screen.height/2f;
     sizeX = spriteRenderer.bounds.size.x * Screen.height/2f;
     defaultFontSize = (int)(sizeX*(1/10f));
     petScript = GameObject.Find ("/Pet").GetComponent<AbstractPet> ();
 }
Beispiel #5
0
 void OnEnable()
 {
     gameObject.AddComponent<SpriteRenderer>();
     spriteRenderer = GetComponent<SpriteRenderer>();
     pet = GameObject.Find("Pet");
     abstractPetScript = pet.GetComponent<AbstractPet>();
     textureHello = Resources.Load<Texture2D>("Images/Balloon/balloonHello");
     textureMeal = Resources.Load<Texture2D>("Images/Balloon/balloonMeal");
     textureCare = Resources.Load<Texture2D>("Images/Balloon/balloonCare");
     textureAche = Resources.Load<Texture2D>("Images/Balloon/balloonAche");
     textureThanks = Resources.Load<Texture2D>("Images/Balloon/balloonThanks");
     textureAcheTreat = Resources.Load<Texture2D>("Images/Balloon/balloonAcheTreat");
     textureMealFull = Resources.Load<Texture2D>("Images/Balloon/balloonMealFull");
     texture = textureHello;
     transform.localScale = new Vector3(0.7f, 0.7f);
     transform.position = new Vector3(0.0f, 0.35f, 3f);
     isRunning = false;
 }
Beispiel #6
0
 void Initialize()
 {
     gameObject.AddComponent<SpriteRenderer>();
     spriteRenderer = GetComponent<SpriteRenderer>();
     Texture2D texture = Resources.Load<Texture2D>("Images/Icon/paintPenNumber");
     spriteRenderer.sprite = SpriteManager.GetSprite(texture);
     transform.localScale = new Vector3(0.3f, 0.3f, 1.0f);
     transform.localPosition = PositionManager.GetFitPosition(0.45f, 0.73f, 3.0f);
     gameObject.AddComponent<BoxCollider2D>();
     // CreateIcon ();
     screenPosition = Camera.main.WorldToScreenPoint(transform.position);
     sizeY = spriteRenderer.bounds.size.y * Screen.height/2f;
     sizeX = spriteRenderer.bounds.size.x * Screen.height/2f;
     fontSize = (int)(sizeY*(5/10f));
     petScript = GameObject.Find("/Pet").GetComponent<AbstractPet>();
     ButtonAnimation.SetAnimation(transform, "", "button_paint01");
     whiteOutManager = GameObject.Find("/WhiteOutManager");
     whiteOutManagerScript = whiteOutManager.GetComponent<WhiteOutManager>();
 }
Beispiel #7
0
 void Start()
 {
     Initialize ();
     pet = GameObject.Find("Pet");
     abstractPetScript = pet.GetComponent<AbstractPet>();
 }
Beispiel #8
0
 public void SetAbstractPetScript()
 {
     pet = GameObject.Find("/Pet");
     this.abstractPetScript = pet.GetComponent<AbstractPet>();
 }
Beispiel #9
0
 void Start()
 {
     this.nextScenes = "Main";
     pet = GameObject.Find("Pet");
     abstractPetScript = pet.GetComponent<AbstractPet>();
     saveDataManager = GameObject.Find("/SaveDataManager");
     saveDataManagerScript = saveDataManager.GetComponent<SaveDataManager>();
     whiteOutManager = GameObject.Find("/WhiteOutManager");
     whiteOutManagerScript = whiteOutManager.GetComponent<WhiteOutManager>();
     whiteOutManagerScript.state = "In";
     CreateAllObject();
     pet.GetComponent<Animator>().enabled = true;
     pet.transform.localPosition = new Vector3(0f, -0.1f, 4f);
     gameObject.AddComponent<AudioSource>();
     GetComponent<AudioSource>().clip = Resources.Load<AudioClip>("Audio/main_bgm04");
     GetComponent<AudioSource>().volume = 0.8f;
     GetComponent<AudioSource> ().playOnAwake = false;
     GetComponent<AudioSource>().loop = true;
     GetComponent<AudioSource>().Play();
 }
Beispiel #10
0
 void Start()
 {
     hoge = false;
      		if (this.gameObject.tag == "CareTool"){
         abstractCareTool = this.gameObject.GetComponent<AbstractCareTool>();
     }
     if (this.gameObject.tag == "Meal"){
         abstractMeal = this.gameObject.GetComponent<AbstractMeal>();
     }
     pet = GameObject.Find ("Pet");
     _abstractPet = pet.GetComponent<AbstractPet>();
 }
Beispiel #11
0
 void Start()
 {
     pet = GameObject.Find("Pet");
     abstractPetScript = pet.GetComponent<AbstractPet>();
     balloon = GameObject.Find ("/ViewController/Balloon");
 }