Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        spriteRenderer = GetComponent <SpriteRenderer>();
        cutscene       = GameObject.FindWithTag("Spawn");
        crashed        = cutscene.GetComponent <Crashland>();
        spawnCheck     = new Vector3(-1.5f, 1.5f, 0);
        position       = transform.position;
        if (spriteRenderer.flipX)
        {
            position.x -= 0.2f;
        }
        else if (!spriteRenderer.flipX)
        {
            position.x += 0.2f;
        }
        consumable = Instantiate(item, position, transform.rotation);
        if (consumable.gameObject.name == "Power(Clone)")
        {
            consumable.gameObject.name = "Power";
        }
        ItemFloat dropping = consumable.GetComponent <ItemFloat>();

        dropping.dropTime     = 2;
        dropping.dropStrength = Vector2.down * 10;
        dropping.dropped      = false;
    }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     cam        = GetComponent <Cinemachine.CinemachineVirtualCamera>();
     cutscene   = GameObject.FindWithTag("Spawn");
     crashed    = cutscene.GetComponent <Crashland>();
     spawnCheck = new Vector3(-1.5f, 1.5f, 0);
 }
 // Use this for initialization
 void Start()
 {
     falling    = GameObject.FindWithTag("Spawn");
     crash      = falling.GetComponent <Crashland>();
     animator   = GetComponent <Animator>();
     spawnCheck = new Vector3(-1.5f, 1.5f, 0);
 }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     spriteRenderer = GetComponent <SpriteRenderer>();
     rb2d           = GetComponent <Rigidbody2D>();
     falling        = GameObject.FindWithTag("Spawn");
     crash          = falling.GetComponent <Crashland>();
     animator       = GetComponent <Animator>();
     spawnCheck     = new Vector3(-1.5f, 1.5f, 0);
 }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     rb2d           = GetComponent <Rigidbody2D>();
     playerscene    = GameObject.FindWithTag("Spawn");
     cutscene       = playerscene.GetComponent <Crashland>();
     animator       = GetComponent <Animator>();
     spriteRenderer = GetComponent <SpriteRenderer>();
     bc2d           = GetComponent <BoxCollider2D>();
     spawnCheck     = new Vector3(-1.5f, 1.5f, 0);
 }
Beispiel #6
0
 // Use this for initialization
 void Start()
 {
     animator       = GetComponent <Animator>();
     bc2d           = GetComponent <BoxCollider2D>();
     rb2d           = GetComponent <Rigidbody2D>();
     spriteRenderer = GetComponent <SpriteRenderer>();
     cutscene       = GameObject.FindWithTag("Spawn");
     crashed        = cutscene.GetComponent <Crashland>();
     spawnCheck     = new Vector3(-1.5f, 1.5f, 0);
     hp             = 1;
     spotted        = false;
     throwFork      = false;
 }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     playerscene = GameObject.FindWithTag("Spawn");
     cutscene    = playerscene.GetComponent <Crashland>();
     //pc = GameObject.FindWithTag("Player");
     spriteRenderer = GetComponent <SpriteRenderer>();
     animator       = GetComponent <Animator>();
     rb2d           = GetComponent <Rigidbody2D>();
     bc2d           = GetComponent <BoxCollider2D>();
     hp             = GetComponent <EnemyHealth>();
     spottedPlayer  = false;
     idle           = false;
     spawnPosition  = transform.position;
     spawnCheck     = new Vector3(-1.5f, 1.5f, 0);
 }
Beispiel #8
0
 // Use this for initialization
 void Start()
 {
     cutscene   = GameObject.FindWithTag("Spawn");
     crashed    = cutscene.GetComponent <Crashland>();
     spawnCheck = new Vector3(-1.5f, 1.5f, 0);
 }