Example #1
0
 void Start()
 {
     colliderManager = GameObject.FindObjectOfType <JColliderManager>();
     collider        = GetComponent <JCollider>();
     settings        = GetComponent <BombSettings>();
     AFEventManager.INSTANCE.AddListener(this);
     Invoke("TriggerExplosionDueToLifeTime", settings.MaxLifeTimeWithoutExploding);
 }
Example #2
0
        void Start()
        {
            meshRenderers        = GetComponentsInChildren <MeshRenderer>();
            settings             = GetComponent <BombSettings>();
            currentBlinkDuration = 1f / BlinksPerSecond;
            minBlinkDuration     = 1f / MaxBlinksPerSecond;
            StartColor           = settings.color;
            EndColor             = new Color(settings.color.r, settings.color.g, settings.color.b, 0f);

            Invoke("StartBlinking", settings.MaxLifeTimeWithoutExploding - TimeLeftBeforeBlinking);
        }