Exemple #1
0
    // Use this for initialization
    void Start()
    {
        playerController = GameObject.FindObjectOfType <PlayerController>();
        teethList        = new List <ToothBehaviour>(GameObject.FindObjectsOfType <ToothBehaviour>());
        var arm = spawnArmPrefab.GetComponent <ArmBehaviour>();

        startDelay = arm.lerpSpeed + startDelayBuffer;
        inputDelay = inputDelayTimeTotal;

        head = GameObject.FindObjectOfType <GiantHeadBehaviour>();
    }
Exemple #2
0
    void Start()
    {
        head             = GameObject.FindObjectOfType <GiantHeadBehaviour>();
        playerController = GameObject.FindObjectOfType <PlayerController>();
        manager          = GameObject.FindObjectOfType <GameManager>();
        rigidBody        = GetComponent <Rigidbody2D>();

        gumController = GetComponentInParent <GumController>();
        armManager    = GameObject.FindObjectOfType <ArmManager>();

        if (GameManager.looseTeeth < GameManager.maxLooseTeeth && Random.value <= randomLooseChance)
        {
            isLooseTooth            = true;
            GameManager.looseTeeth += 1;
        }
    }
    void Start()
    {
        var srList = GetComponentsInChildren <SpriteRenderer>();



        giantHead = GameObject.FindObjectOfType <GiantHeadBehaviour>();
        // print("SkinColorTest:");
        // CheckAllSkinCombos(giantHead.AdjustedSkinColorSet(),skinColors,hueProxMin);


        var color = PickColorWithMinDistance(giantHead.skinColor, skinColors, hueProxMin);

        foreach (SpriteRenderer sr in srList)
        {
            sr.color = color;
        }
    }
Exemple #4
0
    public virtual void Start()
    {
        initialPosition        = transform.position;
        palmTransform.rotation = Quaternion.identity;

        gameManager = GameObject.FindObjectOfType <GameManager>();

        if (debugTarget != null)
        {
            SetupWithTarget(debugTarget.position);
        }

        retreatTimer = retreatSpeed;
        giantHead    = GameObject.FindObjectOfType <GiantHeadBehaviour>();
        foreach (SpriteRenderer sprite in skinSprites)
        {
            sprite.color = giantHead.skinColor;
        }
    }