コード例 #1
0
    protected virtual void Start()
    {
        //Set layer to player
        gameObject.layer = 10;
        Physics2D.IgnoreLayerCollision(8, 10);

        playerVariable.CurrentScore = 0;
        pickUpSound = pickUpSound.Initialize(gameObject);
    }
コード例 #2
0
ファイル: Pellets.cs プロジェクト: MonarchDoge/JCUGameJamTest
    protected override void Awake()
    {
        base.Awake();
        rb = GetComponent <Rigidbody2D> ();

        if (explosionSound)
        {
            explosionSound = explosionSound.Initialize(gameObject);
        }
    }
コード例 #3
0
    private void Awake()
    {
        Instance      = this;
        IsGameRunning = true;
        roundTimer    = levelFightTime;

        BGM = BGM.Initialize(gameObject);
        BGM.Play();
        //levels = levels.RandomizeList();
    }
コード例 #4
0
    protected override void Awake()
    {
        base.Awake();
        projRB   = GetComponent <Rigidbody2D> ();
        shakeCam = FindObjectOfType <CameraShake> ();

        if (explosionSound)
        {
            explosionSound = explosionSound.Initialize(gameObject);
        }
    }
コード例 #5
0
    private void Awake()
    {
        instance      = this;
        mainMenuMusic = mainMenuMusic.Initialize(gameObject);
        mainMenuMusic.Play();

        buttonPress = buttonPress.Initialize(gameObject);

        beeping = beeping.Initialize(gameObject);
        //timer.gameObject.SetActive(false);
    }
コード例 #6
0
    protected override void Awake()
    {
        base.Awake();

        rb       = GetComponent <Rigidbody2D> ();
        velocity = transform.right * FireForce;

        transform.rotation = Quaternion.Euler(Vector3.zero);

        if (explosionSound)
        {
            explosionSound = explosionSound.Initialize(gameObject);
        }
    }
コード例 #7
0
    protected virtual void Awake()
    {
        //set projectile to bullet layer
        //than ignore the gun layer
        //so bullet doesnt blow up on gun
        gameObject.layer = 9;
        Physics2D.IgnoreLayerCollision(8, 9);
        Physics2D.IgnoreLayerCollision(9, 11);

        if (fireSound)
        {
            fireSound = fireSound.Initialize(gameObject);
        }
    }