void Start()
    {
        this.aiState          = AIState.WAIT;
        this.navMeshAgent     = this.GetComponent <NavMeshAgent>();
        this.materialAnimator = this.GetComponentInChildren <MaterialAnimator>();

        this.thrower = this.GetComponent <Thrower>();
        this.thrower.GotItemListener = this.OnFoundPickUp;
    }
 private void Start()
 {
     instance  = this;
     iBoxColor = boxColor.GetColor("_EmissionColor");
     for (int i = 0; i < ghostColors.Length; i++)
     {
         iGhostColors[i]   = ghostColors[i].GetColor("_EmissionColor");
         iGhostTextures[i] = ghostColors[i].GetTexture("_MainTex");
     }
     blueGhostTex = blueGhost.GetTexture("_MainTex");
     blue         = blueGhost.GetColor("_EmissionColor");
 }
Example #3
0
    public void UpdateMaterialAnimator(String oldKey, String newKey, MaterialAnimator animator)
    {
        if (animatorsMap.ContainsKey(oldKey))
        {
            var oldAnimatorList = animatorsMap[oldKey];
            oldAnimatorList.Remove(animator);
        }
        ICollection <MaterialAnimator> animatorList;

        if (!animatorsMap.ContainsKey(newKey))
        {
            animatorList = new LinkedList <MaterialAnimator>();
            animatorsMap.Add(newKey, animatorList);
        }
        else
        {
            animatorList = animatorsMap[newKey];
        }
        animatorList.Add(animator);
    }
 protected static void SetMaterials(state s)
 {
     MaterialAnimator.ChangeState(s);
     //if(s == state.NORMAL) {
     //	//foreach(Character c in ghostPositions.Keys) {
     //	//	for(int i = 0; i < c.rendy.materials.Length; i++) {
     //	//		Debug.Log("ghost: " + c);
     //	//		c.rendy.materials[i] = c.imaterials[i];
     //	//	}
     //	//}
     //} else {
     //	//Character[] ghosts = new Character[4];
     //	//ghostPositions.Keys.CopyTo(ghosts, 0);
     //	//foreach(Character c in ghosts) {
     //	//	c.rendy.materials[0] = ghostBlue;
     //	//	c.rendy.materials[1] = ghostBlue;
     //	//	c.rendy.materials[2] = unlitWhite;
     //	//	c.rendy.materials[3] = unlitWhite;
     //	//}
     //}
 }
Example #5
0
 void Start()
 {
     this.thrower          = this.GetComponent <Thrower>();
     this.materialAnimator = this.GetComponentInChildren <MaterialAnimator>();
 }
Example #6
0
 void Start()
 {
     this.animator        = this.GetComponentInChildren <MaterialAnimator>();
     this.movenetProvider = this.GetComponent <IMovementProvider>();
 }