Example #1
0
    protected override void Awake()
    {
        base.Awake();
        thisRigidbody = GetComponent <Rigidbody2D>();
        SceneObjectContainer.AddProjectileContainer(gameObject.tag);

        axis = axisAngle(angle);
        move = axis * moveSpeed;
    }
Example #2
0
    protected override void Awake()
    {
        base.Awake();

        thisRigidbody = GetComponent <Rigidbody2D>();
        playerAudio   = GetComponent <AudioSource>();
        playerGun_1   = thisTransform.GetChild(0).gameObject.GetComponent <Gun>();
        playerGun_2   = thisTransform.GetChild(1).gameObject.GetComponent <Gun>();

        thisTransform.parent = SceneObjectContainer.Player.transform;
        SceneObjectContainer.AddProjectileContainer(gameObject.tag);
    }