Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     inputs       = GetComponent <playerInput>();
     canDragOther = true;
     // _sprite = GetComponentInChildren<Sprite>();
     _animator = GetComponent <Animator>();
 }
Beispiel #2
0
 private void Awake()
 {
     player       = GameObject.Find("Player");
     _input       = player.GetComponent <playerInput>();
     activateable = GetComponent <IActivateable>();
     ePopup       = this.transform.GetChild(0).gameObject;
 }
Beispiel #3
0
 private void Awake()
 {
     inputManager = GetComponent <playerInput>(); //store reference input manager
     if (inputManager == null)                    //double check wether it actually exists
     {
         Debug.LogWarning("How did you even do this, the playerInput script is required. Please re-attach this script.");
         GetComponent <playerInput>().enabled = false;
     }
 }
Beispiel #4
0
 private void Start()
 {
     anim         = GetComponent <Animator>();
     _input       = GetComponent <playerInput>();
     rb           = GetComponent <Rigidbody2D>();
     sceneManager = GameObject.FindGameObjectWithTag("SceneManager").GetComponent <SceneManager>();
     audioSource  = GetComponent <AudioSource>();
     nextPlayTime = Time.time;
 }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     inputs   = GetComponent <playerInput> ();
     GM       = GetComponent <gameManager1> ();
     pointer1 = Instantiate(pointer1, transform.position, transform.rotation);
     pointer2 = Instantiate(pointer2, transform.position, transform.rotation);
     pointer1.SetActive(false);
     pointer2.SetActive(false);
     movingFingerIndex = 0;
 }
Beispiel #6
0
 void Start()
 {
     playerNum    = 0;
     playerNumMax = 2;
     inputs       = GetComponent <playerInput>();
     playerList   = new List <Player>();
     for (int i = playerNum; i < playerNumMax; i++)
     {
         addPlayer();
     }
 }
Beispiel #7
0
    void Awake()
    {
        inputs = GetComponent <playerInput> ();

        players = GameObject.FindGameObjectsWithTag("Player");
        // playerList = new List<GameObject>();
        //foreach (GameObject go in players)
        //{
        //  playerList.Add(go);
        // }
    }
Beispiel #8
0
 void Awake()
 {
     uiManager     = GameObject.Find("Canvas").GetComponent <UImanager>();
     shotTimes     = 0;
     inputs        = GetComponent <playerInput> ();
     fingertipList = new List <GameObject>();
     GameObject[] fingertips = GameObject.FindGameObjectsWithTag("fingertips");
     foreach (GameObject go in fingertips)
     {
         fingertipList.Add(go);
     }
 }
Beispiel #9
0
    // Use this for initialization
    void Start()
    {
        controls     = GetComponent <playerInput>();
        affectorSize = areaEffector.GetComponent <SpriteRenderer>().bounds.size.x;

        colliderList.Add(pointEffector);
        colliderList.Add((Collider2D)Instantiate(pointEffector));
        colliderList[1].transform.parent     = transform;
        colliderList[1].transform.localScale = colliderList[0].transform.localScale;

        colliderListArea.Add(areaEffector);
        colliderListArea.Add((Collider2D)Instantiate(areaEffector));
        colliderListArea[1].transform.parent     = transform;
        colliderListArea[1].transform.localScale = colliderListArea[0].transform.localScale;
        colliderListArea[1].gameObject.SetActive(false);
    }
Beispiel #10
0
 private void Awake()
 {
     roadScript = GameObject.Find("RoadParent").GetComponent <RoadScript>();
     playerInp  = Player.GetComponent <playerInput>();
 }