示例#1
1
    //-------------------------------------------------------------------
    private void Start()
    {
        tinker = GameObject.Find("tinker").GetComponent<tinker>();
        likesPercentage = tinker.likesPercentage;
        childrenPercentage = tinker.childrenPercentage;

        // get UI elements
        planetAlignText = GameObject.Find("planetAligned").GetComponent<Text>();
        likesText = GameObject.Find("likes").GetComponent<Text>();
        followersText = GameObject.Find("followers").GetComponent<Text>();
        populationText = GameObject.Find("population").GetComponent<Text>();
        deathText = GameObject.Find("death").GetComponent<Text>();
        childrenText = GameObject.Find("children").GetComponent<Text>();

        // tinker update
        fadeSpeed = tinker.flashFadeOutSpeed;

        // calculate likes
        if (gameManager.Instance.alignedPlanetCount == maxPlanetCount)
            likes = (gameManager.Instance.followers * likesPercentage);
        else
            likes = (gameManager.Instance.followers * likesPercentage) / (maxPlanetCount - gameManager.Instance.alignedPlanetCount);

        // show score
        planetAlignText.text = "You aligned " + gameManager.Instance.alignedPlanetCount + " planets";
        likesText.text = customFormatting(likes);
        followersText.text = customFormatting(gameManager.Instance.followers);
        populationText.text =  customFormatting(gameManager.Instance.population);
        deathText.text = customFormatting(gameManager.Instance.dead);
        childrenText.text = customFormatting(gameManager.Instance.dead * childrenPercentage);
    }
 // Use this for initialization
 void Start()
 {
     anim = this.GetComponent<Animator>();
     lastPos = transform.position;
     tinker = GameObject.Find("tinker").GetComponent<tinker>();
     shipCtrl = GameObject.Find("ship").GetComponent<shipControl>();
     shipAudio = GameObject.Find("ship").GetComponent<shipSound>();
 }
 void Start()
 {
     sun = GameObject.Find("sun");
     ship = GameObject.Find("ship");
     shipCtrl = ship.GetComponent<shipControl>();
     tinker = GameObject.Find("tinker").GetComponent<tinker>();
     centre = sun.transform.position;
     anim = GetComponent<Animator>();
 }
    void Start()
    {
        phone = GameObject.Find("phone_setup").GetComponent<phoneSetup>();
        tinker = GameObject.Find("tinker").GetComponent<tinker>();

        planets = GameObject.FindGameObjectsWithTag("Planet");
        ResetPlanetTrack();

        StartCoroutine(UpdateIdleMessages());
    }
    void Start()
    {
        tinker = GameObject.Find("tinker").GetComponent<tinker>();

        // define message font
        textStyle = new GUIStyle();
        textStyle.normal.textColor = Color.white;
        textStyle.wordWrap = true;
        textStyle.font = (Font)Resources.Load("Fonts/MunroSmall");
    }
示例#6
0
    //-------------------------------------------------------------------
    void Start()
    {
        tinker = GameObject.Find("tinker").GetComponent<tinker>();
        gravityBeam = GameObject.Find("gravityBeam").GetComponent<gravityBeam>();
        phoneAppAnim = GameObject.Find("phone_app").GetComponent<Animator>();
        snapshotAudio = GameObject.Find("camera_sound").GetComponent<snapshotSound>();

        // make button invisible (gravity beam will make it visible)
        GetComponent<Renderer>().enabled = false;
    }
 //-------------------------------------------------------------------
 void Start()
 {
     planets = GameObject.FindGameObjectsWithTag("Planet");
     animationCtrl = this.GetComponent<gravityBeamAnimation>();
     tinker = GameObject.Find("tinker").GetComponent<tinker>();
     shipAnim = GameObject.Find("ship").GetComponent<shipAnimation>();
     backgroundAudio = GameObject.Find("setup").GetComponent<backgroundSound>();
     planetAudio = GameObject.Find("planets").GetComponent<planetSound>();
     phoneAppAnim = GameObject.Find("phone_app").GetComponent<Animator>();
     glowAnim = GameObject.Find ("phone_glow").GetComponent<Animator> ();
 }
    // Use this for initialization
    void Start()
    {
        sunBack = GameObject.Find ("sunBackDeath");
        sunFront = GameObject.Find ("sunFrontDeath");;
        sunWayBack = GameObject.Find ("sunWayBackDeath");;

        sunAnim = this.GetComponent<Animator>();
        sunBackAnim = sunBack.GetComponent<Animator>();
        sunFrontAnim = sunFront.GetComponent<Animator>();
        sunWayBackAnim = sunWayBack.GetComponent<Animator>();

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

        initPosition = transform.position;
    }
    //-------------------------------------------------------------------
    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));
    }
 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");
 }
示例#11
0
 void Start()
 {
     tinker = GameObject.Find("tinker").GetComponent<tinker>();
     shipCtrl = GameObject.Find("ship").GetComponent<shipControl>();
 }
示例#12
0
 //-------------------------------------------------------------------
 void Start()
 {
     tinker = GameObject.Find("tinker").GetComponent<tinker>();
     gravityBeam = GameObject.Find("gravityBeam").GetComponent<gravityBeam>();
     shipAnim = this.GetComponent<shipAnimation>();
 }
    // Use this for initialization
    void Start()
    {
        anim = this.GetComponent<Animator>();
        hover = GameObject.Find("shipHover");
        hoverAnim = hover.GetComponent<Animator>();
        guideAnim = GameObject.Find("beamGuide").GetComponent<Animator>();
        planets = GameObject.FindGameObjectsWithTag("Planet");
        hoverSprite = hover.GetComponent<SpriteRenderer>();
        hoverSprite.enabled = false;
        tinker = GameObject.Find("tinker").GetComponent<tinker>();
        sunAnim = GameObject.Find("sun").GetComponent<sunAnimation>();
        shipAudio = GameObject.Find("ship").GetComponent<shipSound>();

        coneL = GameObject.Find("cone_L_OFS");
        coneR = GameObject.Find("cone_R_OFS");
        coneLSpriteRend = GameObject.Find("cone_L").GetComponent<SpriteRenderer>();
        coneRSpriteRend = GameObject.Find("cone_R").GetComponent<SpriteRenderer>();
        coneLSpriteRend.enabled = false;
        coneRSpriteRend.enabled = false;
    }
示例#14
0
 //-------------------------------------------------------------------
 void Awake()
 {
     tinker = GameObject.Find("tinker").GetComponent<tinker>();
     sun = GameObject.Find("sun");
 }