Ejemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.name.Contains("malcolm"))
     {
         scoring sc = GameObject.Find("Scoring").GetComponent <scoring>();
         sc.setGesture(6);
     }
 }
Ejemplo n.º 2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.name.Contains("malcolm"))
     {
         BodyProperties BP = GameObject.Find("skeleton").GetComponentInChildren <BodyProperties>();
         if (BP != null)
         {
             BP.GD.accuracy = 0;
         }
         scoring sc = GameObject.Find("Scoring").GetComponent <scoring>();
         sc.setGesture(2);
     }
 }
    //-------------------------------------------------------------------
    void Start()
    {
        sun = GameObject.Find("sun");
        ship = GameObject.Find("ship");

        // gravity beam
        gravityBeam = GameObject.Find("gravityBeam").GetComponent<gravityBeam>();
        anim = GetComponent<planetAnimation>();
        scoring = GameObject.Find("setup").GetComponent<scoring>();

        // settings
        tinker = GameObject.Find("tinker").GetComponent<tinker>();

        // debug
        debugScript = (debug)GameObject.Find("debug").GetComponent(typeof(debug));
    }
Ejemplo n.º 4
0
    // Start is called before the first frame update
    void Start()
    {
        x = transform.position.x;
        y = transform.position.y;

        gameAudio = GetComponent <AudioSource>();
        score     = GameObject.FindObjectOfType <scoring>();
        body      = GetComponent <Rigidbody2D>();

        forceX = Random.Range(-5, 5);
        if (forceX == 0)
        {
            forceX = 2f;
        }
        forceY = Random.Range(-2, 2);
        if (forceY == 0)
        {
            forceY = 2f;
        }

        moveBall();
    }
Ejemplo n.º 5
0
 void Start()
 {
     tinker = GameObject.Find("tinker").GetComponent<tinker>();
     phoneMessaging = GameObject.Find("messages").GetComponent<phoneMessages>();
     scoring = GameObject.Find("setup").GetComponent<scoring>();
     sound = GameObject.Find("planets").GetComponent<planetSound>();
     anim = GetComponent<planetAnimation>();
     planetInit = GetComponent<planetInit>();
     allPlanets = GameObject.FindGameObjectsWithTag("Planet");
 }
Ejemplo n.º 6
0
 void Awake()
 {
     current = this;
 }
Ejemplo n.º 7
0
 void Start()
 {
     pS = GameObject.FindObjectOfType <PlayerStats>();
     transform.position = pS.GetStartPosition();
     scoring            = GameObject.FindObjectOfType <scoring>();
 }
Ejemplo n.º 8
0
 void Awake()
 {
     current = this;
 }