Beispiel #1
0
 void Awake()
 {
     physics     = gameObject.GetComponent <SlugPhysics>();
     animManager = GetComponent <AnimationManager>();
     timeUtils   = GetComponent <TimeUtils>();
     collider    = GetComponent <BoxCollider2D>();
 }
Beispiel #2
0
 void Awake()
 {
     physic             = GetComponent <SlugPhysics>();
     knife              = GetComponent <AreaOfEffectProjectile>();
     bottomBodyAnimator = bottomBody.GetComponent <Animator>();
     col       = GetComponent <Collider2D>();
     timeUtils = GetComponent <TimeUtils>();
 }
Beispiel #3
0
 void Awake()
 {
     giftToPlayer             = GetComponentInChildren <CollectibleDef>(true);
     animManager              = GetComponent <HippieAnimationManager>();
     physic                   = GetComponent <SlugPhysics>();
     HippiesBrain             = HippieTiedUp;
     hippieSpeedWalkingFactor = 0.25f;
     hippieSpeedRunningFactor = 2;
 }
Beispiel #4
0
    private void BadaBoom()
    {
        GameObject  projectileGameObject = projectilePool.GetPooledObject();
        IProjectile projectile           = projectileGameObject.GetComponent <IProjectile>();
        SlugPhysics projPhysic           = projectileGameObject.GetComponent <SlugPhysics>();

        projectileGameObject.transform.position = projectileInitialPos.position;
        projectile.Launch("Player");
        projPhysic.SetVelocityX(transform.right.x * 0.4f);
        audioManager.PlaySound(2);
    }
Beispiel #5
0
 void Awake()
 {
     physic         = GetComponent <SlugPhysics>();
     blink          = GetComponent <Blink>();
     spriteRenderer = GetComponent <SpriteRenderer>();
     velX           = UnityEngine.Random.Range(-2.5f, 1.5f);
     velY           = UnityEngine.Random.Range(0.5f, 3f);
     if (fallOnly)
     {
         velY /= 10;
     }
 }
Beispiel #6
0
 void Awake()
 {
     inputManager    = GetComponent <InputManager>();
     animManager     = GetComponent <AnimationManager>();
     blink           = GetComponent <Blink>();
     physic          = GetComponent <SlugPhysics>();
     movementManager = GetComponent <MovementManager>();
     health          = GetComponent <HealthManager>();
     timeUtils       = GetComponent <TimeUtils>();
     spriteRenderers = GetComponentsInChildren <SpriteRenderer>();
     flashBright     = GetComponent <FlashUsingMaterial>();
     playerIndicator = GetComponentInChildren <FlipPlayerIndicator>();
     playerIndicator.gameObject.SetActive(false);
 }
Beispiel #7
0
 void Awake()
 {
     physic         = GetComponent <SlugPhysics>();
     targetDistance = GetComponent <EnemyTargetDistance>();
     SpeedFactor    = 1.0f;
 }