Exemplo n.º 1
0
    public void Initialize()
    {
        spaceship = GetComponent <Spaceship> ();
        //enemy = GetComponent<Enemy> ();
//		doorref = GameObject.Find ("Title1").GetComponent<SaveDoor>().DOOR.GetComponent<DOOR>();
        doorref    = GameObject.Find("Manager1").GetComponent <SaveDoor>().DOOR.GetComponent <DOOR>();
        answer     = GameObject.Find("Manager1").GetComponent <SaveDoor> ().answer;
        clearTitle = GameObject.Find("Title").GetComponent <Title> ();
        hp         = GameObject.Find("HpBarCtrl").GetComponent <HpBarCtrl> ();
    }
Exemplo n.º 2
0
 public void Initialize(PlayerModel _player, HpBarCtrl _hpBarCtrl, char_count _characterCount, DOOR _DOOR, IAlphabetQueueHandler _alphabetQueueHandler)
 {
     if (_player == null || _hpBarCtrl == null || _characterCount == null)
     {
         throw new ArgumentNullException("null at EnemyCollision");
     }
     firstPlayer          = _player;
     HitPoint             = _hpBarCtrl;
     CharacterCount       = _characterCount;
     DoorRefference       = _DOOR;
     alphabetQueueHandler = _alphabetQueueHandler;
 }
    // Use this for initialization

    void Start()
    {
        GameObject  player      = GameObject.Find("Player");
        PlayerModel firstPlayer = player.GetComponent <PlayerModel> ();
        //FirstPlayer firstPlayer = player.GetComponent<FirstPlayerChild> () as FirstPlayer;
        HpBarCtrl             hpBarCtrl            = GameObject.Find("HpBarCtrl").GetComponent <HpBarCtrl> ();
        char_count            characterCount       = GameObject.Find("char_count").GetComponent <char_count> ();;
        DOOR                  DoorRefference       = GameObject.Find("Manager1").GetComponent <SaveDoor>().DOOR.GetComponent <DOOR>();
        IAlphabetQueueHandler alphabetQueueHandler = new AlphabetQueueHandler();
        Animator              playerAnimator       = player.GetComponent <Animator> ();

        playerAnimator.GetBehaviour <InEnemyCollision> ().Initialize(firstPlayer, hpBarCtrl, characterCount, DoorRefference, alphabetQueueHandler);
    }
Exemplo n.º 4
0
    void Start()
    {
        canvasGroup = GetComponentInParent <CanvasGroup>();
        //returnButton = transform.parent.Find("Exit").gameObject;

        //hpbar用
        Slider slider = GameObject.Find("Slider").GetComponent <Slider>();

        hbc = slider.gameObject.GetComponent <HpBarCtrl>();

        //item使用用
        GameObject test = GameObject.Find("ItemMenuSet");

        ilist = test.gameObject.GetComponent <ItemList>();
    }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        //   e_tmp = GameObject.Find("teki1(Clone)").transform.position;
        Vector3 e_tmp = transform.position;

        player_tmp = GameObject.Find("Player").transform.position;

        mytransform = this.transform;
        GameObject sc = GameObject.Find("SceneController");

        scontroller = sc.gameObject.GetComponent <SceneController>();

        Slider slider = GameObject.Find("Slider").GetComponent <Slider>();

        hbc = slider.gameObject.GetComponent <HpBarCtrl>();
    }